From 7db2a471b8398c8132075e03d77060f3cc55075c Mon Sep 17 00:00:00 2001 From: steffen123 Date: Tue, 23 Sep 2008 00:39:37 +0100 Subject: [PATCH] p95 - graph viewer didnt work, fixed it --- pyfpdb/GuiGraphViewer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/GuiGraphViewer.py b/pyfpdb/GuiGraphViewer.py index 3d4be24f..58d79945 100644 --- a/pyfpdb/GuiGraphViewer.py +++ b/pyfpdb/GuiGraphViewer.py @@ -57,7 +57,7 @@ class GuiGraphViewer (threading.Thread): self.cursor.execute("""SELECT handId, winnings FROM HandsPlayers INNER JOIN Players ON HandsPlayers.playerId = Players.id INNER JOIN Hands ON Hands.id = HandsPlayers.handId - WHERE Players.name = %s AND Players.siteId = %s AND tourneysPlayersId is NULL + WHERE Players.name = %s AND Players.siteId = %s AND (tourneysPlayersId IS NULL) ORDER BY siteHandNo""", (name, site)) winnings = self.db.cursor.fetchall() @@ -66,7 +66,7 @@ class GuiGraphViewer (threading.Thread): self.cursor.execute("""SELECT SUM(amount) FROM HandsActions INNER JOIN HandsPlayers ON HandsActions.handPlayerId = HandsPlayers.id INNER JOIN Players ON HandsPlayers.playerId = Players.id - WHERE Players.name = %s AND HandsPlayers.handId = %s AND Players.siteId = %s AND tourneysPlayersId is NULL""", (name, winnings[i][0], site)) + WHERE Players.name = %s AND HandsPlayers.handId = %s AND Players.siteId = %s AND (tourneysPlayersId IS NULL)""", (name, winnings[i][0], site)) spent = self.db.cursor.fetchone() profit[i]=(i, winnings[i][1]-spent[0])