MySQL error from Python

Jeff Epler jepler at unpythonic.net
Sun Jun 27 02:11:58 CEST 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.pgp>


More information about the Python-list mailing list