parameter unsupported when inserting int in sqlite

Note the added comma after “temp” below:

cur.execute('insert into new_test (curent_dt) values (?)', (temp,))

The reason this happens is that (temp) is an integer but (temp,) is a tuple of length one containing temp.

Leave a Comment