I'm using MySQLdb and run into the following problem:
STMT="""INSERT INTO test_table VALUES (%s, %s, %s, %s, %s)"""
rows=[('Wed Apr 14 14:00:00 2010', 23L, -2.3, 4.41, 0.83923)]
conn.cursor().executemay(STMT, rows)
results in:
Traceback (most recent call last):
File "run.py", line 122, in <module>
File "C:\Python25\lib\site-packages\mysql_python-1.2.2.0002-py2.5-win32.egg\MySQLdb\cursors.py", line 276, in _do_query
db.query(q)
_mysql_exceptions.OperationalError: (1136, "Column count doesn't match value count at row 1")
Any hints ?