0

I keep facing this error

mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s)' at line 1

and i do not know why. I am trying to insert 's_agentname' into my sql db but keep getting this error. does anyone know issue

s_agentname = root.clipboard_get()
mycursor.execute("INSERT INTO randeep (agent_name) VALUES(%s)", (s_agentname))

The only SQL import i am using is this one too

import mysql.connector

0 Answers0