我想从 sqlite3 表中检索数据,这是我的代码,但我只得到一个空列表。我在 sqlite3 上检查了我的查询,它在那里工作正常。
import sqlite3
conn = sqlite3.connect("testee.db")
c = conn.cursor()
myquery = ("SELECT stock FROM testproduct WHERE store=3;")
c.execute(myquery)
templist=list(c.fetchall())
但是 templist 是空的。