MySQL error from Python

Jeff Epler jepler at unpythonic.net
Sat Jun 26 20:11:58 EDT 2004


You probably should write
     cursor.execute ("UPDATE product  SET price = %s WHERE competitorID=1"
                     " AND sku = %s",(myprice,mysku))
(remove the single-quotes -- the splitting of the string makes no
difference vs a single line) not
>     cursor.execute ("UPDATE product  SET price = '%s' WHERE competitorID=1
> AND sku = '%s'",(myprice,mysku))

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20040626/96290bb5/attachment.sig>


More information about the Python-list mailing list