ok-the error message I am getting is: mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ……
It applies to the following attempts to find a word within a column (anywhere within the field):
cursor.execute("""SELECT * FROM CSVTEST where DESK = ?"""
values = (word2search4)
THIS GENERATES AN ERROR
sql= "SELECT * FROM CSVTEST WHERE DESK = ? \
VALUES ('%s')" % \
(word2search4)
cursor.execute(sql)
THIS GENERATES AN ERROR
cursor.execute("SELECT * FROM CSVTEST WHERE DESK LIKE '%s'" % symbol)
THIS GENERATES AN ERROR
sql = """SELECT SKU FROM CSVTEST WHERE DESK LIKE '%s'""" %(symb)
cursor.execute(sql)
THIS GENERATES AN ERROR
HOW WOULD YOU FORMULATE AN SQL CALL FROM PYTHON TO SEARCH FOR A WORD WITHIN A TERM OR SENTENCE?
Thank you in advance.-JK
[edit by admin: formatting]