我想从python插入一些值到MySQL,我收到以下错误。Python插入到mysql
连接和代码在Python:
conn = MySQLdb.connect(host="localhost",user="lpr",passwd="[email protected]",db="lpr")
c=conn.cursor()
c.execute("INSERT INTO liccaptured(realtime, proctime, plate, confid, uuid) VALUES (%s,%s,%s,%s,%s)", realtime,proctime,plate,confid,uuid)
错误消息:
c.execute("INSERT INTO liccaptured(realtime, proctime, plate, confid, uuid) VALUES (%s,%s,%s,%s,%s)", realtime,proctime,plate,confid,uuid)
TypeError: execute() takes at most 3 arguments (7 given)
我试图寻找类似的错误,无法弄清我做错了。任何帮助表示感谢。