From 7063bc8905ee165978802bb79b46bea967596f51 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Thu, 22 Jul 2010 20:23:27 +0200 Subject: [PATCH] TOURNEY: stop it from creating new TT for each tourney --- pyfpdb/Database.py | 11 ++++++----- pyfpdb/SQL.py | 3 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index 0337c3f1..685487bc 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1983,19 +1983,20 @@ class Database: (hand.tourNo, hand.siteId) ) result=cursor.fetchone() - print "result of fetching TT by number and site:",result + #print "result of fetching TT by number and site:",result if result: tourneyTypeId = result[0] else: # Check for an existing TTypeId that matches tourney info, if not found create it - 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.buyInChips, hand.isKO, hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency + #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.buyInChips, hand.isKO, - hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix, hand.added, hand.addedCurrency) + (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) ) result=cursor.fetchone() - print "result of fetching TT by details:",result + #print "result of fetching TT by details:",result try: tourneyTypeId = result[0] diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index b0105da7..ad2b7df0 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -3692,15 +3692,12 @@ class Sql: AND fee=%s AND category=%s AND limitType=%s - AND buyInChips=%s AND knockout=%s AND rebuy=%s AND addOn=%s AND speed=%s AND shootout=%s AND matrix=%s - AND added=%s - AND addedCurrency=%s """ self.query['insertTourneyType'] = """INSERT INTO TourneyTypes