Skip to content
Snippets Groups Projects
Commit e78f2690 authored by nkour's avatar nkour
Browse files

max is faster than count. thanks norman

parent 50af6160
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ def visit(arg, dirname, filenames): ...@@ -78,7 +78,7 @@ def visit(arg, dirname, filenames):
cur.execute('INSERT INTO jids (jid) VALUES (?)', (jid,)) cur.execute('INSERT INTO jids (jid) VALUES (?)', (jid,))
con.commit() con.commit()
cur.execute('SELECT COUNT(*) FROM jids') cur.execute('SELECT MAX(jid) FROM jids')
JID_ID = cur.fetchone()[0] JID_ID = cur.fetchone()[0]
f = open(path_to_text_file, 'r') f = open(path_to_text_file, 'r')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment