sqlite3.ProgrammingError:提供的绑定数量不正确。当前语句使用0,并且提供了1

时间:2019-03-12 14:42:21

标签: python sqlite

当我尝试在python中执行以下代码时,出现上述错误:

statusses = []
reqIDs = []

    for row in c.execute('SELECT id FROM xxx').fetchall():

        for row1 in c.execute('SELECT xxx FROM xxx WHERE xxx IN (?)',(row)).fetchall():
            reqIDs.append(row1)

    for row in reqIDs:

        for row1 in c.execute("SELECT xxx FROM xxx WHERE xxx LIKE '%?%'", (row)).fetchall():
            statusses.append(row1)

输出:

File "C:/Users/xxx/Desktop/xxx/REST_xxx.py", line 580, in functionX()
for row1 in c.execute("SELECT xxx FROM xxx WHERE xxx LIKE '%?%'", (row)).fetchall():
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are 1 supplied.

0 个答案:

没有答案