actually store TT.maxSeats

This commit is contained in:
steffen123 2010-08-22 06:46:47 +02:00
parent fb6c5c7ec6
commit aabc9d2006
2 changed files with 8 additions and 5 deletions

View File

@ -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)
)

View File

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