Fix for postgres graph query - Remove column names to fix syntax error

This commit is contained in:
Worros 2008-11-27 10:28:19 +09:00
parent bffbc18ff4
commit 6c4c450f07

View File

@ -618,7 +618,7 @@ class FpdbSQLQueries:
if(self.dbname == 'MySQL InnoDB') or (self.dbname == 'PostgreSQL'): if(self.dbname == 'MySQL InnoDB') or (self.dbname == 'PostgreSQL'):
self.query['getRingProfitAllHandsPlayerIdSite'] = """ self.query['getRingProfitAllHandsPlayerIdSite'] = """
SELECT hp.handId, hp.winnings, SUM(ha.amount) costs, hp.winnings - SUM(ha.amount) profit SELECT hp.handId, hp.winnings, SUM(ha.amount), hp.winnings - SUM(ha.amount)
FROM HandsPlayers hp FROM HandsPlayers hp
INNER JOIN Players pl ON hp.playerId = pl.id INNER JOIN Players pl ON hp.playerId = pl.id
INNER JOIN Hands h ON h.id = hp.handId INNER JOIN Hands h ON h.id = hp.handId
@ -631,7 +631,7 @@ class FpdbSQLQueries:
elif(self.dbname == 'SQLite'): elif(self.dbname == 'SQLite'):
#Probably doesn't work. #Probably doesn't work.
self.query['getRingProfitAllHandsPlayerIdSite'] = """ self.query['getRingProfitAllHandsPlayerIdSite'] = """
SELECT hp.handId, hp.winnings, SUM(ha.amount) costs, hp.winnings - SUM(ha.amount) profit SELECT hp.handId, hp.winnings, SUM(ha.amount), hp.winnings - SUM(ha.amount)
FROM HandsPlayers hp FROM HandsPlayers hp
INNER JOIN Players pl ON hp.playerId = pl.id INNER JOIN Players pl ON hp.playerId = pl.id
INNER JOIN Hands h ON h.id = hp.handId INNER JOIN Hands h ON h.id = hp.handId