首页 > 编程 > Python > 正文

Python使用sqlite3模块进行带参数数据查询时报错

2019-11-06 08:20:17
字体:
来源:转载
供稿:网友

<type 'exceptions.Exception'> : Incorrect number of bindings supplied. The current statement uses 1, and there are XX supplied.

在进行带参数的sql查询时,提示以上报错信息

有两种解决方法:

一:在参数后面加逗号“,”

二:将圆小括号换成方括号

知乎上有个回答解释的很清晰

可参考:http://stackoverflow.com/questions/16856647/sqlite3-PRogrammingerror-incorrect-number-of-bindings-supplied-the-current-sta


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表