Another MySQL Images Question
Victor Subervi
victorsubervi at gmail.com
Fri Apr 18 11:13:32 EDT 2008
Hi;
If I grab an image in the database thus:
sql = "select pic1 from products where id='" + str(id) + "';"
cursor.execute(sql)
pic1 = cursor.fetchall()[0][0].tostring()
# pic1 = cursor.fetchall()[0][0] // either this or the above line
and try and re-insert it thus:
cursor.execute('update products set pic1="%s" where id="%s", ;',
(pic1, id))
it tells me I have an error in my MySQL syntax. What is the error?
TIA,
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080418/add3149e/attachment.html>
More information about the Python-list
mailing list