add date boundaries in filters

This commit is contained in:
lastpoet 2010-10-12 20:34:06 +01:00 committed by Worros
parent f78044e4c1
commit 6e00ba9d78
2 changed files with 5 additions and 0 deletions

View File

@ -1062,6 +1062,7 @@ class Filters(threading.Thread):
result = self.db.cursor.fetchall()
t1 = result[0][0].split()[0]
self.start_date.set_text(t1)
if t2 == '':
self.cursor.execute(self.sql.query['get_last_date'])
result = self.db.cursor.fetchall()

View File

@ -1396,6 +1396,10 @@ class Sql:
, maxSeats, knockout, rebuy, addOn, speed, shootout, matrix, sng)"""
self.query['get_last_hand'] = "select max(id) from Hands"
self.query['get_last_date'] = "SELECT MAX(startTime) FROM Hands"
self.query['get_first_date'] = "SELECT MIN(startTime) FROM Hands"
self.query['get_player_id'] = """
select Players.id AS player_id