Answer the question
In order to leave comments, you need to log in
The function does not work as it should, what should I do?
The thing is, the function doesn't work properly in my bot.
def starvation_system():
db = sqlite3.connect("base.db") # подключение базы данных.
sql = db.cursor()
while True:
for sqlse in sql.execute(f"SELECT * FROM users"):
sql.execute(f"SELECT * FROM users WHERE userid = '{sqlse[1]}'")
user_info = sql.fetchone()
sql.execute(f"UPDATE users SET golod = '{user_info[12] - int(10)}' WHERE userid = '{sqlse[1]}'")
db.commit()
time.sleep(5)
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