Answer the question
In order to leave comments, you need to log in
How to check if certain data exists in MySQL DB in python?
I am writing my first bot for Telegram (TelebotAPi library (telebot)), and I need the bot to register user data in the database .. in principle, I managed to do it, but if I send "/start" to it again, it will again add data to the database . How to check for the presence of data in the database?
Answer the question
In order to leave comments, you need to log in
SELECT * FROM ваша_таблица WHERE ваш_параметр=чему-то.
# Например
SELECT * FROM MyTable WHERE user_id=12345678
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question