MySQL Insert
Carsten Haese
carsten.haese at gmail.com
Tue Jul 15 13:32:40 EDT 2008
maestroQC wrote:
> cursor.execute("INSERT INTO es_accounts (dateCreated,
> accountNumber, description, openingBalance) VALUES (%s, %s, %s
> , %d)", (date, accountNumber, description, dec))
> File "c:\python25\lib\site-packages\MySQLdb\cursors.py", line 151,
> in execute
> query = query % db.literal(args)
> TypeError: int argument required
The placeholder for query parameters in MySQLdb is always %s, regardless
of the data type the actual value might have.
HTH,
--
Carsten Haese
http://informixdb.sourceforge.net
More information about the Python-list
mailing list