I am trying to update three columns in my table with data by using Python variables, but I have ran into an issue which I don't seem to understand.
I have done some amendments but still run into issues, can anyone see what I am doing wrong?
My table:
Columns id code url val1 val2 val3
Data 1 A2941 url.com NULL NULL NULL
My query:
cursor.execute("UPDATE mytable SET val1=%s", (myVar))
Error message:
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