我的代码:
@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。