Fix insertPlayer so that it works again
This commit is contained in:
parent
d905b6e780
commit
08a70b75f2
|
@ -1043,7 +1043,7 @@ class Database:
|
||||||
c.execute ("SELECT id FROM Players WHERE name=%s".replace('%s',self.sql.query['placeholder'])
|
c.execute ("SELECT id FROM Players WHERE name=%s".replace('%s',self.sql.query['placeholder'])
|
||||||
,(name,))
|
,(name,))
|
||||||
tmp = c.fetchone()
|
tmp = c.fetchone()
|
||||||
if (len(tmp)==0): #new player
|
if (tmp == None): #new player
|
||||||
c.execute ("INSERT INTO Players (name, siteId) VALUES (%s, %s)".replace('%s',self.sql.query['placeholder'])
|
c.execute ("INSERT INTO Players (name, siteId) VALUES (%s, %s)".replace('%s',self.sql.query['placeholder'])
|
||||||
,(name, site_id))
|
,(name, site_id))
|
||||||
#Get last id might be faster here.
|
#Get last id might be faster here.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user