0

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

1 Answer 1

1
UPDATE Customer_Orders SET Progress=? WHERE OrderID=?

remove the comma before WHERE.

See more about UPDATE in SQL here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.