record HC.TTid on pgsql

This commit is contained in:
steffen123 2010-08-11 04:39:34 +02:00
parent 02b5ea8d37
commit f1ac0b1dfa
2 changed files with 5 additions and 1 deletions

View File

@ -1474,7 +1474,7 @@ class Database:
INNER JOIN Tourneys t ON (t.id = tp.tourneyId)""")
rebuild_sql_tourney = rebuild_sql_tourney.replace('<tourney_group_clause>', ",t.tourneyTypeId")
rebuild_sql_tourney = rebuild_sql_tourney.replace('<where_clause>', where)
print "rebuild_sql_tourney:",rebuild_sql_tourney
#print "rebuild_sql_tourney:",rebuild_sql_tourney
self.get_cursor().execute(rebuild_sql_tourney)
self.commit()

View File

@ -3170,6 +3170,7 @@ class Sql:
,playerId
,activeSeats
,position
<tourney_insert_clause>
,styleKey
,HDs
,wonWhenSeenStreet1
@ -3259,6 +3260,7 @@ class Sql:
when hp.position = '9' then 'E'
else 'E'
end AS hc_position
<tourney_select_clause>
,'d' || to_char(h.startTime, 'YYMMDD')
,count(1)
,sum(wonWhenSeenStreet1)
@ -3332,11 +3334,13 @@ class Sql:
,sum(CAST(hp.street4Raises as integer))
FROM HandsPlayers hp
INNER JOIN Hands h ON (h.id = hp.handId)
<tourney_join_clause>
<where_clause>
GROUP BY h.gametypeId
,hp.playerId
,h.seats
,hc_position
<tourney_group_clause>
,to_char(h.startTime, 'YYMMDD')
"""
else: # assume sqlite