Answer the question
In order to leave comments, you need to log in
How to make sql not throw syntax error?
I wrote a function that checks if there is an element in the database by its link
def check_advestisement(self, user_id, adv_url):
sql = "SELECT * FROM `{}` WHERE `Ссылка на объявление`={}".format(user_id, adv_url)
self.adv_cursor.execute(sql)
myr = self.adv_cursor.fetchone()
print(myr)
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