import sqlite3
conn = sqlite3.connect(f'./path/file_{nFileNo}.db')
print("Opened database successfully")
c = conn.cursor()
c.execute('select count(*) from tab_name where state=0')
nCount = int(c.fetchone()[0])
c.execute('select ID from tab_name where state=filter')
for a in c:
print(f'正处理:{a[0]}, 已处理{nIndex}, 剩余{nCount-nIndex}')
网友评论