繁体   English   中英

SQLite3-提供的绑定数量不正确

[英]SQLite3 - Incorrect number of bindings supplied

我是SQL的新手,所以也许这是一个新手问题。 但是这是我的简单代码(也是,我正在使用python):

@classmethod
def next_page(cls):
    cls.cur.execute("SELECT * FROM Posts WHERE Id < 10 ORDER BY Date DESC Limit 10")
    rows = cls.cur.fetchall()

    return rows

运行此命令时,出现以下错误:

Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "database.py", line 20, in next_page
        rows = cls.cur.fetchall()
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 2 supplied

有人知道该如何处理吗? 任何帮助表示赞赏

事实证明(自从我在REPL中运行代码以来),您必须按CTRL + C并在修改文件时再次输入REPL。

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM