I need to add data to one column by username or id, however, in neither case is there any change in the table. It does not write any error, but it does not update the data either. What could be the mistake here?
import sqlite3
connection_users = sqlite3.connect("mybot.db")
cursor_users = connection_users.cursor()
cursor_users.execute('''UPDATE bot_users SET Fantasy = "Fantasy" WHERE id = 1''')
connection_users.commit()
connection_users.close()
I have such a table, and I need each user to add a value to a separate column. For example, a user chooses a fantasy genre, and I need to add this genre to the Fantasy column for this user. However, this could not be done with the help of the presented code (I tried to run it, update the table in sqlite, but to no avail)
user25553377 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.