From f4aa5f1fe191c2e3615dc441e5ef13d558338f4d Mon Sep 17 00:00:00 2001 From: Worros Date: Mon, 2 Nov 2009 13:38:36 +0800 Subject: [PATCH] First fix for sqlite in PlayerStats Fix courtesy of Eleatic Stranger on 2+2 - Page still does not work, need to find an sqlite equivalent to to_char() and variance() --- pyfpdb/SQL.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 3c25963f..2743a407 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -1895,9 +1895,9 @@ class Sql: self.query['playerDetailedStats'] = """ select AS hgametypeid ,gt.base - ,gt.category + ,gt.category AS category ,upper(gt.limitType) AS limittype - ,s.name + ,s.name AS name ,min(gt.bigBlind) AS minbigblind ,max(gt.bigBlind) AS maxbigblind /*, AS gtid*/ @@ -1939,7 +1939,8 @@ class Sql: ,100.0*avg((hp.totalProfit+hp.rake)/(gt.bigBlind+0.0)) AS bb100xr ,avg((hp.totalProfit+hp.rake)/100.0) AS profhndxr ,avg(h.seats+0.0) AS avgseats - ,variance(hp.totalProfit/100.0) AS variance + /*,variance(hp.totalProfit/100.0) AS variance*/ + ,0.0 AS variance from HandsPlayers hp inner join Hands h on (h.id = hp.handId) inner join Gametypes gt on (gt.Id = h.gameTypeId)