I'm having a problem whilst trying to execute an SQL line of code:
sql1 = "select ",(variable.get())," FROM ProductTable WHERE", Queryby.get()
cursor.execute(sql1)
When I go to execute these lines of code in the program, it says
ValueError: operation parameter must be str
I presume this is because of the fact I am trying to use .get() inside the sql line of code. The reason I assume this is because if I change the code from cursor.execute(sql) to print(sql1) it says:
('select ', 'OrderNo', ' FROM ProductTable WHERE', 'This is a test')
I think the problem is that this isn't all considered a string, but I'm unsure of the resolution on how to call the .get() parts of the code without interfering the SQL. Any suggestions?
+, not,. I'm not sure what theQuerybypart is supposed to do with the string it generates...? Compare it to something?