Python Forum
MySQLdb._exceptions.ProgrammingError: not enough arguments for format string. - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: MySQLdb._exceptions.ProgrammingError: not enough arguments for format string. (/thread-23889.html)



MySQLdb._exceptions.ProgrammingError: not enough arguments for format string. - farah97 - Jan-22-2020

Hi...I have created a button to copy data from table1 to table2. The problem is I got this error:
Error:
MySQLdb._exceptions.ProgrammingError: not enough arguments for format string
This is my code:
cur.execute("INSERT INTO table2 (id,q) WHERE id = %s SELECT id,q FROM table1 WHERE id = %s", [id])