Answer the question
In order to leave comments, you need to log in
How to check if such record exists in SQLite database?
def proverka():
vid_foot = f'SELECT * FROM USERS WHERE ("vid") VALUES (?)', ("Печать на футболках", )
connection = sqlite3.connect("basa35.db")
cursor = connection.cursor()
cursor.execute(vid_foot)
result = cursor.fetchall()
return result
@bot.message_handler(content_types=['text'])
def test2(message):
true = proverka()
if not true:
bot.send_message(message.chat.id, 'не футболка')
Answer the question
In order to leave comments, you need to log in
Strange query syntax, probably it should be like this:
vid_foot = f"SELECT * FROM USERS WHERE vid = 'Печать на футболках'"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question