[NEWIMPORT] Fix thinko on insertPlayer

Was returning the player name instead of id in the case where the player exists in the database, but wasn't cached already

Removing some merge gunge too
This commit is contained in:
Worros 2009-12-17 01:55:48 +08:00 committed by kangaderoo
parent 72cf9a61ca
commit 03deefc1a3
2 changed files with 4 additions and 4 deletions

View File

@ -1857,8 +1857,10 @@ class Database:
,(name, site_id))
#Get last id might be faster here.
#c.execute ("SELECT id FROM Players WHERE name=%s", (name,))
tmp = [self.get_last_insert_id(c)]
return tmp[0]
result = self.get_last_insert_id(c)
else:
result = tmp[1]
return result
def insertGameTypes(self, row):
c = self.get_cursor()

View File

@ -2787,8 +2787,6 @@ class Sql:
,hp.tourneyTypeId
,date_format(h.handStart, 'd%y%m%d')
"""
#>>>>>>> 28ca49d592c8e706ad6ee58dd26655bcc33fc5fb:pyfpdb/SQL.py
#"""
elif db_server == 'postgresql':
self.query['rebuildHudCache'] = """
INSERT INTO HudCache