From 9815ac976bdaa02317845e646b14bcdca672b01b Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 11 Jul 2010 04:47:15 +0200 Subject: [PATCH] display buyin and sitename rather than TT.id --- pyfpdb/GuiTourneyPlayerStats.py | 3 ++- pyfpdb/SQL.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyfpdb/GuiTourneyPlayerStats.py b/pyfpdb/GuiTourneyPlayerStats.py index 68d28934..6d7540a5 100644 --- a/pyfpdb/GuiTourneyPlayerStats.py +++ b/pyfpdb/GuiTourneyPlayerStats.py @@ -75,8 +75,9 @@ class GuiTourneyPlayerStats (threading.Thread): # ToDo: create popup to adjust column config # columns to display, keys match column name returned by sql, values in tuple are: # is column displayed, column heading, xalignment, formatting, celltype - self.columns = [ ["tourneyTypeId", True, "TTypeId", 0.0, "%s", "str"] + self.columns = [ ["siteName", True, "Site", 0.0, "%s", "str"] #, ["tourney", False, "Tourney", 0.0, "%s", "str"] # true not allowed for this line + , ["buyIn", True, "BuyIn", 1.0, "%3.2f", "str"] , ["playerName", False, "Name", 0.0, "%s", "str"] # true not allowed for this line (set in code) , ["tourneyCount", True, "#", 1.0, "%1.0f", "str"] , ["1st", False, "1st", 1.0, "%3.1f", "str"] diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 7e7209dd..21255e49 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -2261,6 +2261,7 @@ class Sql: self.query['tourneyPlayerDetailedStats'] = """ select s.name AS siteName ,t.tourneyTypeId AS tourneyTypeId + ,(CASE WHEN tt.currency = "USD" THEN tt.buyIn/100.0 ELSE tt.buyIn END) AS buyIn ,p.name AS playerName ,SUM(CASE WHEN rank = 1 THEN 1 ELSE 0 END) AS 1st ,SUM(CASE WHEN rank = 2 THEN 1 ELSE 0 END) AS 2nd