sql and cursor execute bugfixes to make it work with postgres

This commit is contained in:
sqlcoder
2009-05-02 00:28:53 +01:00
parent a466201285
commit 2c991ad2d0
3 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -120,7 +120,7 @@ class Database:
"""Get and return the cards for each player in the hand."""
cards = {} # dict of cards, the key is the seat number example: {1: 'AcQd9hTs5d'}
c = self.connection.cursor()
c.execute(self.sql.query['get_cards'], hand)
c.execute(self.sql.query['get_cards'], [hand])
colnames = [desc[0] for desc in c.description]
for row in c.fetchall():
s_dict = {}
@@ -133,7 +133,7 @@ class Database:
"""Get and return the community cards for the specified hand."""
cards = {}
c = self.connection.cursor()
c.execute(self.sql.query['get_common_cards'], hand)
c.execute(self.sql.query['get_common_cards'], [hand])
colnames = [desc[0] for desc in c.description]
for row in c.fetchall():
s_dict = {}