python sqlite3.operational错误:靠近“,”:语法错误

2024-09-30 22:18:35 发布

您现在位置:Python中文网/ 问答频道 /正文

这不是我的代码;我是从https://www.youtube.com/channel/UC4KX0hatvRrOVy_D0nPlusg得到的。作者没有源代码,所以我只能从视频中输入。他工作得很好,但我一直犯这个错误:

File "D:\ProgramDevelopment\Python\Project\Python_GUI_IDEL\PythonDatabaseYoutube.py", line 45, in run_query
query_result= cursor.execute(query,parameters)
sqlite3.OperationalError: near ",": syntax error" 

github中的链接:https://github.com/ahmed-aya/Python_database/blob/master/Python_Database

^{pr2}$

Tags: 代码httpsgithubcom视频源代码youtubewww
1条回答
网友
1楼 · 发布于 2024-09-30 22:18:35

正如你的错误所说,你有个打字错误。在

query = 'UPDATE product SET name=?,price,=? WHERE name=? AND price =?'
                                        ^ extra comma here

相关问题 更多 >