From 3158c85d4f03bbde8577e7a754f55ab5e0a2cb2c Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 9 Sep 2010 17:48:19 +0800 Subject: [PATCH 1/2] PSSummary: make space in Player regex optional again --- pyfpdb/PokerStarsSummary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/PokerStarsSummary.py b/pyfpdb/PokerStarsSummary.py index 87505f00..cda1de40 100644 --- a/pyfpdb/PokerStarsSummary.py +++ b/pyfpdb/PokerStarsSummary.py @@ -77,7 +77,7 @@ class PokerStarsSummary(TourneySummary): re_Currency = re.compile(u"""(?P[%(LS)s]|FPP)""" % substitutions) - re_Player = re.compile(u"""(?P[0-9]+):\s(?P.*)\s\(.*\),(\s)(\$(?P[0-9]+\.[0-9]+))?(?Pstill\splaying)?((?PTournament\sTicket)\s\(WSOP\sStep\s(?P\d)\))?\s+?""") + re_Player = re.compile(u"""(?P[0-9]+):\s(?P.*)\s\(.*\),(\s)?(\$(?P[0-9]+\.[0-9]+))?(?Pstill\splaying)?((?PTournament\sTicket)\s\(WSOP\sStep\s(?P\d)\))?\s+?""") re_DateTime = re.compile("\[(?P[0-9]{4})\/(?P[0-9]{2})\/(?P[0-9]{2})[\- ]+(?P[0-9]+):(?P[0-9]+):(?P[0-9]+)") From d0df1b6e4413b095300f8d8f9657f4b343bd281d Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 9 Sep 2010 18:08:03 +0800 Subject: [PATCH 2/2] SQL: Iport tourneyResults query --- pyfpdb/SQL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index fff3f07e..2994515f 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -3050,7 +3050,7 @@ class Sql: # Tourney Results query #################################### self.query['tourneyResults'] = """ - SELECT tp.tourneyId, (tp.winnings - tt.buyIn - tt.fee) as profit, tp.koCount, tp.rebuyCount, tp.addOnCount, tt.buyIn, tt.fee, t.siteTourneyNo + SELECT tp.tourneyId, (coalesce(tp.winnings,0) - coalesce(tt.buyIn,0) - coalesce(tt.fee,0)) as profit, tp.koCount, tp.rebuyCount, tp.addOnCount, tt.buyIn, tt.fee, t.siteTourneyNo FROM TourneysPlayers tp INNER JOIN Players pl ON (pl.id = tp.playerId) INNER JOIN Tourneys t ON (t.id = tp.tourneyId)