Answer the question
In order to leave comments, you need to log in
How to add values to db?
Let's say the value is 30, you need to add another 30 to it to get 60.
How can this be done?
def set_time_sub(self, user_id, time_sub):
with self.connection:
return self.cursor.execute("UPDATE `users` SET `time_sub` = ? WHERE `user_id` = ?", (time_sub, user_id,))
time_sub = int(time.time()) + days_to_seconds(30)
db.set_time_sub(message.from_user.id, time_sub)
Answer the question
In order to leave comments, you need to log in
UPDATE `users` SET `time_sub` = `time_sub` + ? WHERE `user_id` = ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question