Answer the question
In order to leave comments, you need to log in
Mysql.connector.errors.ProgrammingError: 1054 (42S22): Unknown column ' ' in 'where clause'. How to decide?
the function accepts an incoming message:
def check_answer(message):
db_work = mySQL()
a = db_work.check_answers(message)
print(a)
db_work.close()
def check_answers(self, text):
self.cursor.execute("SELECT * FROM answers WHERE text = " + str(text))
data = self.cursor.fetchone()
return data
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question