From 913fa7d7d81b080d3ead0a5ea69afae3799b8474 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 11 Jul 2010 04:59:31 +0200 Subject: [PATCH] fix formatting and add tourneycount to TPS --- pyfpdb/GuiTourneyPlayerStats.py | 12 ++++++------ pyfpdb/SQL.py | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pyfpdb/GuiTourneyPlayerStats.py b/pyfpdb/GuiTourneyPlayerStats.py index 6d7540a5..90a7ecff 100644 --- a/pyfpdb/GuiTourneyPlayerStats.py +++ b/pyfpdb/GuiTourneyPlayerStats.py @@ -80,14 +80,14 @@ class GuiTourneyPlayerStats (threading.Thread): , ["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"] - , ["2nd", True, "2nd", 1.0, "%3.1f", "str"] - , ["3rd", True, "3rd", 1.0, "%3.1f", "str"] - , ["unknownRank", True, "unknown", 1.0, "%3.1f", "str"] + , ["1st", False, "1st", 1.0, "%1.0f", "str"] + , ["2nd", True, "2nd", 1.0, "%1.0f", "str"] + , ["3rd", True, "3rd", 1.0, "%1.0f", "str"] + , ["unknownRank", True, "unknown", 1.0, "%1.0f", "str"] #, ["itm", True, "ITM", 1.0, "%2.2f", "str"] #, ["roi", True, "ROI", 1.0, "%3.1f", "str"] - , ["invested", True, "Invested", 1.0, "%3.1f", "str"] - , ["profit", True, "Profit", 1.0, "%3.1f", "str"]] + , ["invested", True, "Invested", 1.0, "%3.2f", "str"] + , ["profit", True, "Profit", 1.0, "%3.2f", "str"]] self.stats_frame = gtk.Frame() self.stats_frame.show() diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 21255e49..a8784544 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -2263,6 +2263,7 @@ class Sql: ,t.tourneyTypeId AS tourneyTypeId ,(CASE WHEN tt.currency = "USD" THEN tt.buyIn/100.0 ELSE tt.buyIn END) AS buyIn ,p.name AS playerName + ,COUNT(1) AS tourneyCount ,SUM(CASE WHEN rank = 1 THEN 1 ELSE 0 END) AS 1st ,SUM(CASE WHEN rank = 2 THEN 1 ELSE 0 END) AS 2nd ,SUM(CASE WHEN rank = 3 THEN 1 ELSE 0 END) AS 3rd