Reputation: 3
I'm trying to update an item in my database for the relevant field which is identified by an OrderID.
cursor.execute("UPDATE Customer_Orders SET Progress=?, WHERE OrderID=?",
("Completed", tableOrderInfo[0],))
However, I keep getting this syntax error and I don't know why.
sqlite3.OperationalError: near "WHERE": syntax error
Upvotes: 0
Views: 665
Reputation: 926
UPDATE Customer_Orders SET Progress=? WHERE OrderID=?
remove the comma before WHERE.
See more about UPDATE in SQL here.
Upvotes: 1