I'm running the following Python3 code on a Sqlite3 database:
db.execute("UPDATE user SET ? = ? WHERE id = ?", (name, quantity, str(g.user['id'])))
where db
is my cursor object. However, this produces the error
sqlite3.OperationalError: near "?": syntax error
.
Is this the right syntax for cursor.execute()
?