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() result = self.db.cursor.fetchall()
t1 = result[0][0].split()[0] t1 = result[0][0].split()[0]
self.start_date.set_text(t1) self.start_date.set_text(t1)
if t2 == '': if t2 == '':
self.cursor.execute(self.sql.query['get_last_date']) self.cursor.execute(self.sql.query['get_last_date'])
result = self.db.cursor.fetchall() result = self.db.cursor.fetchall()

View File

@ -1397,6 +1397,10 @@ class Sql:
self.query['get_last_hand'] = "select max(id) from Hands" 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'] = """ self.query['get_player_id'] = """
select Players.id AS player_id select Players.id AS player_id
from Players, Sites from Players, Sites