Revert "stop using the turn column from gamedb"

This reverts commit adb626df3d.
This commit is contained in:
Enno Rehling 2019-04-20 08:15:27 +02:00
parent adb626df3d
commit 6fcfca27ca
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,9 @@ class EPasswd:
def load_database(self, file):
conn = sqlite3.connect(file)
c = conn.cursor()
for row in c.execute('SELECT no, email, password FROM factions ORDER BY turn'):
c.execute('SELECT MAX(turn) FROM factions')
args = c.fetchone()
for row in c.execute('SELECT no, email, password FROM factions WHERE turn=?', args):
(no, email, passwd) = row
self.set_data(baseconvert(no, 36), email, passwd)
conn.close()