Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\tkinter\__init__.py", line 1705, in __call__
return self.func(*args)
File "C:\Users\harsh\Desktop\index.py", line 33, in Login
cursor.execute("SELECT * FROM `member` WHERE `username` = text AND `password` = ?", (USERNAME.get(), PASSWORD.get()))
File "C:\Program Files\Python37\lib\site-packages\mysql\connector\cursor_cext.py", line 261, in execute
"Not all parameters were used in the SQL statement")
mysql.connector.errors.ProgrammingError: Not all parameters were used in the SQL statement
Asked
Active
Viewed 444 times
0

karel
- 5,489
- 46
- 45
- 50
-
1Check line 33. *"Not all parameters were used in the SQL statement"* – Cid Apr 09 '19 at 12:06
-
Did you check this https://stackoverflow.com/questions/20818155/not-all-parameters-were-used-in-the-sql-statement-python-mysql – Mangesh Sathe Apr 09 '19 at 12:10
2 Answers
0
try this:
cursor.execute("SELECT * FROM `member` WHERE `username` = %s AND `password` = %s", (USERNAME.get(), PASSWORD.get()))

Waket Zheng
- 5,065
- 2
- 17
- 30
0
You have an error in your sql execute query, you should know how to do string formatting very well if you are going to pass in your fields. For example, the code you wrote should've been written this way
query = "SELECT * FROM `member` WHERE `username` = {} AND
`password` = {}".format (USERNAME.get(), PASSWORD.get())
cursor.execute(query)
Since you're writing the whole query in just one line, try and make adjustment using the above correction.

DevTotti
- 86
- 6