Duplicated from JohnSmith9982/ChuanhuChatGPT
ef7b87e
1
2
3
4
5
6
7
8
9
10
import sqlite3 mydb=sqlite3.connect("user.db") ## 读取sqlite3的数据 cursor=mydb.cursor() #查询表名 cursor.execute("SELECT username,password FROM user WHERE expire_time > date('now');") Tables=cursor.fetchall() print(Tables)