From 3437f99db7caa73b0f5d2804663a00f866621824 Mon Sep 17 00:00:00 2001 From: gimick Date: Sun, 26 Dec 2010 21:42:16 +0000 Subject: [PATCH] HUD: First hand in database missing from HUD stats --- pyfpdb/SQL.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 9429b910..6a87b433 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -1796,7 +1796,7 @@ class Sql: cast(hp2.street4Raises as integer) AS raise_4 FROM Hands h - INNER JOIN Hands h2 ON (h2.id > %s AND h2.tableName = h.tableName) + INNER JOIN Hands h2 ON (h2.id >= %s AND h2.tableName = h.tableName) INNER JOIN HandsPlayers hp ON (h.id = hp.handId) /* players in this hand */ INNER JOIN HandsPlayers hp2 ON (hp2.playerId+0 = hp.playerId+0 AND (hp2.handId = h2.id+0)) /* other hands by these players */ INNER JOIN Players p ON (p.id = hp2.PlayerId+0) @@ -1899,7 +1899,7 @@ class Sql: cast(hp2.street3Raises as integer) AS raise_3, cast(hp2.street4Raises as integer) AS raise_4 FROM Hands h /* this hand */ - INNER JOIN Hands h2 ON ( h2.id > %s /* other hands */ + INNER JOIN Hands h2 ON ( h2.id >= %s /* other hands */ AND h2.tableName = h.tableName) INNER JOIN HandsPlayers hp ON (h.id = hp.handId) /* players in this hand */ INNER JOIN HandsPlayers hp2 ON ( hp2.playerId+0 = hp.playerId+0 @@ -2004,7 +2004,7 @@ class Sql: cast(hp2.street3Raises as integer) AS raise_3, cast(hp2.street4Raises as integer) AS raise_4 FROM Hands h /* this hand */ - INNER JOIN Hands h2 ON ( h2.id > %s /* other hands */ + INNER JOIN Hands h2 ON ( h2.id >= %s /* other hands */ AND h2.tableName = h.tableName) INNER JOIN HandsPlayers hp ON (h.id = hp.handId) /* players in this hand */ INNER JOIN HandsPlayers hp2 ON ( hp2.playerId+0 = hp.playerId+0