def search():
searc = input("Enter the name you want to search: ")
s = (searc)
mycursor.execute("SELECT * FROM studen WHERE Name = {}".format(s))
for i in mycursor:
print(i)
I'm trying to fetch data from the studen
table where name is entered by the user.
Here is the error that I'm getting:
ERROR: mysql.connector.errors.ProgrammingError: 1054 (42S22): Unknown column 'ayush' in 'where clause'