display buyin and sitename rather than TT.id

This commit is contained in:
steffen123 2010-07-11 04:47:15 +02:00
parent 7ddb032205
commit 9815ac976b
2 changed files with 3 additions and 1 deletions

View File

@ -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"]

View File

@ -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