我是 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
有人知道这是怎么回事吗?任何帮助表示赞赏