From 79b3dba2dd1f66ac3d626848492e62cc2892e067 Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Sat, 2 May 2009 21:32:47 +0100 Subject: [PATCH] add steal stat to playerstats --- pyfpdb/FpdbSQLQueries.py | 8 ++++++++ pyfpdb/GuiPlayerStats.py | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pyfpdb/FpdbSQLQueries.py b/pyfpdb/FpdbSQLQueries.py index fca17a5f..55d56650 100644 --- a/pyfpdb/FpdbSQLQueries.py +++ b/pyfpdb/FpdbSQLQueries.py @@ -641,6 +641,7 @@ class FpdbSQLQueries: ,stats.n ,stats.vpip ,stats.pfr + ,stats.steals ,stats.saw_f ,stats.sawsd ,stats.wtsdwsf @@ -671,6 +672,9 @@ class FpdbSQLQueries: ,sum(HDs) AS n ,format(100.0*sum(street0VPI)/sum(HDs),1) AS vpip ,format(100.0*sum(street0Aggr)/sum(HDs),1) AS pfr + ,case when sum(stealattemptchance) = 0 then '0' + else format(100.0*sum(stealattempted)/sum(stealattemptchance),1) + end AS steals ,format(100.0*sum(street1Seen)/sum(HDs),1) AS saw_f ,format(100.0*sum(sawShowdown)/sum(HDs),1) AS sawsd ,case when sum(street1Seen) = 0 then 'oo' @@ -740,6 +744,7 @@ class FpdbSQLQueries: ,stats.n ,stats.vpip ,stats.pfr + ,stats.steals ,stats.saw_f ,stats.sawsd ,stats.wtsdwsf @@ -769,6 +774,9 @@ class FpdbSQLQueries: ,sum(HDs) as n ,to_char(100.0*sum(street0VPI)/sum(HDs),'90D0') AS vpip ,to_char(100.0*sum(street0Aggr)/sum(HDs),'90D0') AS pfr + ,case when sum(stealattemptchance) = 0 then '0' + else to_char(100.0*sum(stealattempted)/sum(stealattemptchance),'90D0') + end AS steals ,to_char(100.0*sum(street1Seen)/sum(HDs),'90D0') AS saw_f ,to_char(100.0*sum(sawShowdown)/sum(HDs),'90D0') AS sawsd ,case when sum(street1Seen) = 0 then 'oo' diff --git a/pyfpdb/GuiPlayerStats.py b/pyfpdb/GuiPlayerStats.py index 213d7535..1a6fbadb 100644 --- a/pyfpdb/GuiPlayerStats.py +++ b/pyfpdb/GuiPlayerStats.py @@ -118,7 +118,7 @@ class GuiPlayerStats (threading.Thread): self.cursor.execute(tmp) result = self.cursor.fetchall() - cols = 16 + cols = 17 rows = len(result)+1 # +1 for title row self.stats_table = gtk.Table(rows, cols, False) self.stats_table.set_col_spacings(4) @@ -126,7 +126,7 @@ class GuiPlayerStats (threading.Thread): vbox.add(self.stats_table) # Create header row - titles = ("Game", "Hands", "VPIP", "PFR", "Saw_F", "SawSD", "WtSDwsF", "W$SD", "FlAFq", "TuAFq", "RvAFq", "PoFAFq", "Net($)", "BB/100", "$/hand", "Variance") + titles = ("Game", "Hands", "VPIP", "PFR", "Steals", "Saw_F", "SawSD", "WtSDwsF", "W$SD", "FlAFq", "TuAFq", "RvAFq", "PoFAFq", "Net($)", "BB/100", "$/hand", "Variance") col = 0 row = 0