您正在做什么,应该按照@ScottMorken对这个答案的评论进行操作。
旧答案:
您需要使用以下方法检索查询结果:
.fetchall()
因此,您可以执行以下操作来代替该行:
for columnrow in cursor.execute("select column1,column2 from tbl").fetchall(): ...
您正在做什么,应该按照@ScottMorken对这个答案的评论进行操作。
旧答案:
您需要使用以下方法检索查询结果:
.fetchall()
for columnrow in cursor.execute("select column1,column2 from tbl").fetchall(): ...