MySQL Query Problem

Victor Subervi victorsubervi at gmail.com
Fri Sep 17 08:51:31 EDT 2010


Hi;
I have this code:

        cursor.execute('insert into Passengers values (Null, %s, %s, %s, %s,
%s, %s, %s, %s, "no", "n/a")', (curr_flight, curr_customer, name, curr_sex,
curr_weight, price, curr_rt, curr_confirmation))

Now, when I print it out, add quotes where necessary and enter it in at a
mysql prompt, all goes well. But when I do it this way, it enters null
values for curr_customer and curr_weight! Same darn thing printed out works
at the prompt. What gives?
TIA,
beno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100917/3b57bcf7/attachment.html>


More information about the Python-list mailing list