简体   繁体   English

Python SQlite3更新函数sqlite3.OperationalError:“ WHERE”附近:语法错误

[英]Python SQlite3 Update function, sqlite3.OperationalError: near “WHERE”: syntax error

I'm trying to update an item in my database for the relevant field which is identified by an OrderID. 我正在尝试为订单ID标识的相关字段更新数据库中的项目。

 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
UPDATE Customer_Orders SET Progress=? WHERE OrderID=?

remove the comma before WHERE. 在WHERE之前删除逗号。

See more about UPDATE in SQL here . 此处查看有关SQL中UPDATE的更多信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 sqlite3.OperationalError:靠近“WHERE”:语法错误(Python 2,sqlite3) - sqlite3.OperationalError: near “WHERE”: syntax error (Python 2, sqlite3) Python-sqlite3 sqlite3.OperationalError:接近“%”:语法错误? - Python - sqlite3 sqlite3.OperationalError: near “%”: syntax error? sqlite3.OperationalError:在“WHERE”附近:语法错误 - sqlite3.OperationalError: near "WHERE": syntax error sqlite3.OperationalError:“,”附近:语法错误python - sqlite3.OperationalError: near “,”: syntax error python python sqlite3.OperationalError:“-”附近:语法错误 - python sqlite3.OperationalError: near “-”: syntax error Python和sqlite3抛出错误:sqlite3.OperationalError:near“s”:语法错误 - Python and sqlite3 throwing an error: sqlite3.OperationalError: near “s”: syntax error Python2.7-SQLite3库输出错误消息“ sqlite3.OperationalError:靠近“?”:语法错误” - Python2.7 - SQLite3 library outputs error message “sqlite3.OperationalError: near ”?“: syntax error” Python:sqlite3.OperationalError:在“ &lt;”附近:语法错误(使用HTML源代码更新sqlite3字段) - Python: sqlite3.OperationalError: near “<”: syntax error (updating sqlite3 field with html source code) sqlite 问题:sqlite3.OperationalError:“where”附近:语法错误 - sqlite problem : sqlite3.OperationalError: near “where”: syntax error SQLite3 Python 2.7 sqlite3.OperationalError语法错误 - SQLite3 Python 2.7 sqlite3.OperationalError syntax error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM