From 06978fb77bd82ec928606fbd522bc5a4d4a26b15 Mon Sep 17 00:00:00 2001 From: Worros Date: Fri, 17 Dec 2010 18:59:01 +0800 Subject: [PATCH] SQL: Add get_gameinfo_from_hid --- pyfpdb/SQL.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 83e19f13..378c7288 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -1451,6 +1451,34 @@ class Sql: and (p.siteId = %s or %s = -1) """ + self.query['get_gameinfo_from_hid'] = """ + SELECT + s.name, + g.category, + g.base, + g.type, + g.limitType, + g.hilo, + round(g.smallBlind / 100.0,2), + round(g.bigBlind / 100.0,2), + round(g.smallBet / 100.0,2), + round(g.bigBet / 100.0,2), + g.currency + FROM + Hands as h, + Sites as s, + Gametypes as g, + HandsPlayers as hp, + Players as p + WHERE + h.id = %s + and g.id = h.gametypeid + and hp.handid = h.id + and p.id = hp.playerid + and s.id = p.siteid + limit 1 + """ + self.query['get_stats_from_hand'] = """ SELECT hc.playerId AS player_id, hp.seatNo AS seat,