From 5cba225fb3a00b1ed34864f6e218d3b9a4a139ff Mon Sep 17 00:00:00 2001 From: steffen123 Date: Wed, 11 Aug 2010 04:23:16 +0200 Subject: [PATCH] improve naming of replacement clauses --- pyfpdb/Database.py | 10 +++++----- pyfpdb/SQL.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index ed4d69c7..a994b889 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1451,8 +1451,8 @@ class Database: + " or ( hp.playerId in " + str(tuple(self.hero_ids.values())) \ + " and h.startTime > '" + h_start + "'))" \ + " AND hp.tourneysPlayersId IS NULL)" - rebuild_sql_cash = self.sql.query['rebuildHudCache'].replace('', "") - rebuild_sql_cash = rebuild_sql_cash.replace('', "") + rebuild_sql_cash = self.sql.query['rebuildHudCache'].replace('', "") + rebuild_sql_cash = rebuild_sql_cash.replace('', "") rebuild_sql_cash = rebuild_sql_cash.replace('', "") rebuild_sql_cash = rebuild_sql_cash.replace('', "") rebuild_sql_cash = rebuild_sql_cash.replace('', where) @@ -1468,13 +1468,13 @@ class Database: + " or ( hp.playerId in " + str(tuple(self.hero_ids.values())) \ + " and h.startTime > '" + h_start + "'))" \ + " AND hp.tourneysPlayersId >= 0)" - rebuild_sql_tourney = self.sql.query['rebuildHudCache'].replace('', ",tourneyTypeId") - rebuild_sql_tourney = rebuild_sql_tourney.replace('', ",t.tourneyTypeId") + rebuild_sql_tourney = self.sql.query['rebuildHudCache'].replace('', ",tourneyTypeId") + rebuild_sql_tourney = rebuild_sql_tourney.replace('', ",t.tourneyTypeId") rebuild_sql_tourney = rebuild_sql_tourney.replace('', """INNER JOIN TourneysPlayers tp ON (tp.id = hp.tourneysPlayersId) INNER JOIN Tourneys t ON (t.id = tp.tourneyId)""") rebuild_sql_tourney = rebuild_sql_tourney.replace('', ",t.tourneyTypeId") rebuild_sql_tourney = rebuild_sql_tourney.replace('', where) - #print "rebuild_sql_tourney:",rebuild_sql_tourney + print "rebuild_sql_tourney:",rebuild_sql_tourney self.get_cursor().execute(rebuild_sql_tourney) self.commit() diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 5c4b8cf3..ca0c1b47 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -2990,7 +2990,7 @@ class Sql: ,playerId ,activeSeats ,position - + ,styleKey ,HDs ,wonWhenSeenStreet1 @@ -3080,7 +3080,7 @@ class Sql: when hp.position = '9' then 'E' else 'E' end AS hc_position - + ,date_format(h.startTime, 'd%y%m%d') ,count(1) ,sum(wonWhenSeenStreet1) @@ -3346,7 +3346,7 @@ class Sql: ,playerId ,activeSeats ,position - + ,styleKey ,HDs ,wonWhenSeenStreet1 @@ -3436,7 +3436,7 @@ class Sql: when hp.position = '9' then 'E' else 'E' end AS hc_position - + ,'d' || substr(strftime('%Y%m%d', h.startTime),3,7) ,count(1) ,sum(wonWhenSeenStreet1)