From ba52cb93d1737e310a7e4dcfb15a75831876da9d Mon Sep 17 00:00:00 2001 From: Worros Date: Fri, 14 Nov 2008 19:27:37 +1000 Subject: [PATCH] Actually implement sqlcoders query as intended. Query running in about 30% of the time. --- pyfpdb/GuiGraphViewer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyfpdb/GuiGraphViewer.py b/pyfpdb/GuiGraphViewer.py index 29eb0833..a6c52567 100644 --- a/pyfpdb/GuiGraphViewer.py +++ b/pyfpdb/GuiGraphViewer.py @@ -103,11 +103,11 @@ class GuiGraphViewer (threading.Thread): # returns (HandId,Winnings,Costs,Profit) winnings = self.db.cursor.fetchall() - profit=range(len(winnings)) - for i in profit: - self.cursor.execute(self.sql.query['getRingProfitFromHandId'], (name, winnings[i][0], site)) - spent = self.db.cursor.fetchone() - profit[i]=(i, winnings[i][1]-spent[0]) +# profit=range(len(winnings)) +# for i in profit: +# self.cursor.execute(self.sql.query['getRingProfitFromHandId'], (name, winnings[i][0], site)) +# spent = self.db.cursor.fetchone() +# profit[i]=(i, winnings[i][1]-spent[0]) # y=map(lambda x:float(x[1]), profit) y=map(lambda x:float(x[3]), winnings)