Database: def getSiteTourneyNos(self, site)

This commit is contained in:
Worros 2011-02-11 17:53:18 +08:00
parent f0c315969f
commit 059ca2307f

View File

@ -634,6 +634,18 @@ class Database:
return c.fetchone()[0] return c.fetchone()[0]
#end def getTourneyCount #end def getTourneyCount
def getSiteTourneyNos(self, site):
c = self.connection.cursor()
# FIXME: Take site and actually fetch siteId from that
# Fixed to Winamax atm
q = self.sql.query['getSiteTourneyNos']
q = q.replace('%s', self.sql.query['placeholder'])
c.execute(q, (14,))
alist = []
for row in c.fetchall():
alist.append(row)
return alist
def get_actual_seat(self, hand_id, name): def get_actual_seat(self, hand_id, name):
c = self.connection.cursor() c = self.connection.cursor()
c.execute(self.sql.query['get_actual_seat'], (hand_id, name)) c.execute(self.sql.query['get_actual_seat'], (hand_id, name))