MySQL Forums
Forum List  »  Connector/Python

Re: Python/Connect and Placeholders
Posted by: Geert Vanderkelen
Date: March 12, 2013 05:47AM

You are missing a comma in the argument list:

cursor.execute(sql, (source))
should be:
cursor.execute(sql, (source,))

If you don't give an ending comma with a list of 1 element, (source) is just a
string or int, or whatever type source has.

Geert Vanderkelen
Software Developer at Oracle

Options: ReplyQuote

Written By
March 01, 2013 02:45AM
Re: Python/Connect and Placeholders
March 12, 2013 05:47AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.