Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- conn = sqlite3.connect("db.sqlite")
- cursor = conn.cursor()
- category = ','.join(categories)
- sql = """
- UPDATE Users
- SET Categories = 'None{}'
- WHERE Categories = '{}'
- """.format(call.from_user.id, category)
- cursor.execute(sql)
- conn.commit()
- except Error as e:
- print(e)
- finally:
- conn.close()
Advertisement
Add Comment
Please, Sign In to add comment