I have this code:
SQL = 'INSERT INTO teste(id,completed) VALUES(%(id)s, %(completed)s);'
data = {
'id':1,
'completed':False}
cursor.execute(SQL, data)
connection.commit()
connection.close()
cursor.close()
and this is working just fine!
Question: How do I add records in bulk? I tried to change data to this:
data = {
'id':[1,2,3],
'completed':[False,False,True]}
but if fails.