I'm trying to insert in mysql, but I received an error
import mysql.connector
cnx = mysql.connector.connect(user='xxx', password='xx',
host='127.0.0.1',
database='xxx')
insert = cnx.cursor()
insertC001 = """INSERT INTO efd.reg_C001 (ID,ID_PAI,LINHA,HASH,REG,IND_MOV) VALUES (%d,%d,%d,%d,'%s','%s')"""
data = (0, 2, 14, 0, 'C001', '0')
insert.execute(insertC001,data) Error:---------------------------------------------------------------------------
ProgrammingError Traceback (most recent call last)
<ipython-input-1-31f7a3e6b94d> in <module>()
9
10 data = (0, 2, 14, 0, 'C001', '0',)
---> 11 insert.execute(insertC001,data)
12
13 cnx.commit()
C:\Desenvolvimento\Anaconda3\lib\site-packages\mysql\connector\cursor_cext.py in execute(self, operation, params, multi)
259 if psub.remaining != 0:
260 raise errors.ProgrammingError(
--> 261 "Not all parameters were used in the SQL statement")
262
263 try:
ProgrammingError: Not all parameters were used in the SQL statementWhats the problem?
