[Tutor] Support

Kent Johnson kent37 at tds.net
Sat Apr 9 21:59:21 CEST 2005

Alberto Troiano wrote:
> Hey dudes
> This code worked fine
> The one you gave me worked as well but when I wanteed to store it in the 
> database it says that the packet was too large
> Whit this code it doesn't complain but now I don't know  how to retrieve 
> the image
> I retrieve it like this:
> db=MySQLdb.connect(connection string)
> cursor=db.cursor()
> cursor.execute("select * from image")
> res=cursor.fetchall()
> Now I have the binary string in res[1] but when I try to open it it 
> gives me an error (I'm sorry I'm not in the machine that has the 
> database and I forgot to copy the error :/)

I think res is going to be a sequence of sequences. So I think the first image will be at res[0][1]. 
Otherwise the error message will be helpful.


More information about the Tutor mailing list