[英]How i can print the row in Python (Sqlite3, Python)
Why Python doesn't print the rows it says nothing in the console.为什么 Python 不打印它在控制台中什么也没说的行。
def read_from_db():
cur.execute("select * from people where username=:useru1 and password=:userp1", {"useru1": useru1, "userp1": userp1})
for row in cur.fetchall():
print(row[0])
print(row[1])
con.commit()
read_from_db() read_from_db()
Please try this.请试试这个。
def read_from_db():
cur.execute("select * from people where username=:useru1 and password=:userp1", {"useru1": useru1, "userp1": userp1})
for row in cur.fetchall():
print(row[0])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.