A
A
Asxabtamiev2022-01-11 03:11:23
Python
Asxabtamiev, 2022-01-11 03:11:23

Why doesn't the bot write the value 0?

def set_active(self, user_id, active):
    with self.connection:
        return self.cursor.execute("UPDATE `users` SET `active` = ? WHERE `user_id` = ?", (active, user_id))


But when writing, the error is:
return self.cursor.execute("UPDATE users SET active = ? WHERE user_id = ?", (active, user_id))
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question