Merge carls latest fixes

This commit is contained in:
steffen123 2010-07-12 16:53:14 +02:00
commit c3077d5d66
2 changed files with 13 additions and 8 deletions

View File

@ -624,7 +624,7 @@ class RingFilters(Filters.Filters):
vbox.pack_start(vbox1, False, False, 0) vbox.pack_start(vbox1, False, False, 0)
self.boxes['limits'] = vbox1 self.boxes['limits'] = vbox1
self.cursor.execute(self.sql.query['getLimits3']) self.cursor.execute(self.sql.query['getCashLimits'])
# selects limitType, bigBlind # selects limitType, bigBlind
result = self.db.cursor.fetchall() result = self.db.cursor.fetchall()
found = {'nl':False, 'fl':False, 'pl':False, 'ring':False, 'tour':False} found = {'nl':False, 'fl':False, 'pl':False, 'ring':False, 'tour':False}

View File

@ -1986,13 +1986,18 @@ class Sql:
ORDER by type, limitType DESC, bigBlind DESC""" ORDER by type, limitType DESC, bigBlind DESC"""
self.query['getLimits3'] = """select DISTINCT type self.query['getLimits3'] = """select DISTINCT type
, gt.limitType , gt.limitType
, case type , case type
when 'ring' then bigBlind when 'ring' then bigBlind
else buyin - else buyin
end as bb_or_buyin - end as bb_or_buyin
from Gametypes gt from Gametypes gt
cross join TourneyTypes tt cross join TourneyTypes tt
order by type, gt.limitType DESC, bb_or_buyin DESC""" order by type, gt.limitType DESC, bb_or_buyin DESC"""
self.query['getCashLimits'] = """select DISTINCT type
, limitType
, bigBlind as bb_or_buyin
from Gametypes gt
order by type, limitType DESC, bb_or_buyin DESC"""
if db_server == 'mysql': if db_server == 'mysql':
self.query['playerDetailedStats'] = """ self.query['playerDetailedStats'] = """
@ -2821,7 +2826,7 @@ class Sql:
AND h.startTime < '<enddate_test>' AND h.startTime < '<enddate_test>'
<limit_test> <limit_test>
<game_test> <game_test>
AND hp.tourneysPlayersId IS NULL AND gt.type is 'ring'
GROUP BY h.startTime, hp.handId, hp.sawShowdown, hp.totalProfit GROUP BY h.startTime, hp.handId, hp.sawShowdown, hp.totalProfit
ORDER BY h.startTime""" ORDER BY h.startTime"""
@ -2839,7 +2844,7 @@ class Sql:
INNER JOIN Players p on (p.Id = hp.playerId) INNER JOIN Players p on (p.Id = hp.playerId)
WHERE hp.playerId in <player_test> WHERE hp.playerId in <player_test>
AND date_format(h.startTime, '%Y-%m-%d') <datestest> AND date_format(h.startTime, '%Y-%m-%d') <datestest>
AND hp.tourneysPlayersId IS NULL AND gt.type is 'ring'
ORDER by time""" ORDER by time"""
elif db_server == 'postgresql': elif db_server == 'postgresql':
self.query['sessionStats'] = """ self.query['sessionStats'] = """
@ -2851,7 +2856,7 @@ class Sql:
INNER JOIN Players p on (p.Id = hp.playerId) INNER JOIN Players p on (p.Id = hp.playerId)
WHERE hp.playerId in <player_test> WHERE hp.playerId in <player_test>
AND h.startTime <datestest> AND h.startTime <datestest>
AND hp.tourneysPlayersId IS NULL AND gt.type is 'ring'
ORDER by time""" ORDER by time"""
elif db_server == 'sqlite': elif db_server == 'sqlite':
self.query['sessionStats'] = """ self.query['sessionStats'] = """
@ -2863,7 +2868,7 @@ class Sql:
INNER JOIN Players p on (p.Id = hp.playerId) INNER JOIN Players p on (p.Id = hp.playerId)
WHERE hp.playerId in <player_test> WHERE hp.playerId in <player_test>
AND h.startTime <datestest> AND h.startTime <datestest>
AND hp.tourneysPlayersId IS NULL AND gt.type is 'ring'
ORDER by time""" ORDER by time"""