它在SQL语法中显示错误:
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
代码:
if(options==2):
query = ("SELECT Sl_NO,Title,Genre FROM dvdstore WHERE Genre = %s")
genre_type = raw_input("Enter the type of genre: ")
print genre_type
try:
y=x.execute(query,(genre_type))
print y
for (Sl_NO,Title,Genre) in x:
print Title
except Error as error:
print(error)