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.*