【发布时间】:2023-04-03 00:18:01
【问题描述】:
这是我的代码:
import web
user_db = web.database(dbn='mysql', ....)
info_list = user_db.query("select * from tablename where t_id= ")
for info in info_list:
# work ok at first time, print the correct id
print info.id
for info in info_list:
# Code can't reach here
print info.id
每个的第二次似乎都行不通。为什么?
【问题讨论】:
-
@alecxe 它有效,谢谢。你能解释一下为什么吗?
标签: python mysql database web.py