added TourneyTypeCount to DB Stats window
This commit is contained in:
parent
ec0db8b7cc
commit
ca61189706
|
@ -565,6 +565,12 @@ class Database:
|
|||
return c.fetchone()[0]
|
||||
#end def getTourneyCount
|
||||
|
||||
def getTourneyTypeCount(self):
|
||||
c = self.connection.cursor()
|
||||
c.execute(self.sql.query['getTourneyTypeCount'])
|
||||
return c.fetchone()[0]
|
||||
#end def getTourneyCount
|
||||
|
||||
def get_actual_seat(self, hand_id, name):
|
||||
c = self.connection.cursor()
|
||||
c.execute(self.sql.query['get_actual_seat'], (hand_id, name))
|
||||
|
|
|
@ -3840,8 +3840,8 @@ class Sql:
|
|||
# Counts for DB stats window
|
||||
################################
|
||||
self.query['getHandCount'] = "SELECT COUNT(id) FROM Hands"
|
||||
|
||||
self.query['getTourneyCount'] = "SELECT COUNT(id) FROM Tourneys"
|
||||
self.query['getTourneyTypeCount'] = "SELECT COUNT(id) FROM TourneyTypes"
|
||||
|
||||
################################
|
||||
# placeholders and substitution stuff
|
||||
|
|
|
@ -323,7 +323,10 @@ class fpdb:
|
|||
+ "other windows have been opened. Re-start fpdb to use this option.")
|
||||
|
||||
def dia_database_stats(self, widget, data=None):
|
||||
self.warning_box(str="Number of hands: "+str(self.db.getHandCount())+"\nNumber of tourneys: "+str(self.db.getTourneyCount()), diatitle="Database Statistics")
|
||||
self.warning_box(str="Number of Hands: "+str(self.db.getHandCount())+
|
||||
"\nNumber of Tourneys: "+str(self.db.getTourneyCount())+
|
||||
"\nNumber of TourneyTypes: "+str(self.db.getTourneyTypeCount()),
|
||||
diatitle="Database Statistics")
|
||||
#end def dia_database_stats
|
||||
|
||||
# def dia_get_db_root_credentials(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user