我想從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)
我試圖尋找類似的錯誤,無法弄清我做錯了。任何幫助表示感謝。