These are also mere suggestions. The statements you use in your print statement and the one you use to feed the cursor differ slightly. The latter is missing quotes around your search criterium.
Isn't it possible to fetch results row by row and see if the missing row is in the set? That way you can get a better feeling about the nature of the error. > cursor.execute('insert into spreadsheets values (Null, %s, 0, %s, 0, Null)', > (client, prod)) Out of curiosity, why would you want to insert null values in id fields? That's a disaster waiting to happen. Regards, Richard -- http://mail.python.org/mailman/listinfo/python-list