From aabc9d20065342c9fa01c93dc6fc2f21fdcfad6c Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 22 Aug 2010 06:46:47 +0200 Subject: [PATCH] actually store TT.maxSeats --- pyfpdb/Database.py | 8 +++++--- pyfpdb/SQL.py | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index ec670b1b..de32791f 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -2062,8 +2062,9 @@ class Database: #print "info that we use to get TT by detail:", hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.isKO, hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix #print "the query:",self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder']) cursor.execute (self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder']), - (hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.isKO, - hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix) #TODO: add koamount + (hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], + hand.gametype['limitType'], hand.maxSeats, hand.isKO, + hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix) ) result=cursor.fetchone() #print "result of fetching TT by details:",result @@ -2072,7 +2073,8 @@ class Database: tourneyTypeId = result[0] except TypeError: #this means we need to create a new entry cursor.execute (self.sql.query['insertTourneyType'].replace('%s', self.sql.query['placeholder']), - (hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], + (hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], + hand.gametype['limitType'], hand.maxSeats, hand.buyInChips, hand.isKO, hand.koBounty, hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency) ) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index c6a2e91d..57eb8c35 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -3968,6 +3968,7 @@ class Sql: AND fee=%s AND category=%s AND limitType=%s + AND maxSeats=%s AND knockout=%s AND rebuy=%s AND addOn=%s @@ -3977,9 +3978,9 @@ class Sql: """ self.query['insertTourneyType'] = """INSERT INTO TourneyTypes - (siteId, currency, buyin, fee, category, limitType, buyInChips, knockout, koBounty, rebuy, + (siteId, currency, buyin, fee, category, limitType, maxSeats, buyInChips, knockout, koBounty, rebuy, addOn ,speed, shootout, matrix, added, addedCurrency) - VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) + VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) """ self.query['getTourneyByTourneyNo'] = """SELECT t.*