From d905b6e78000e4b2ebe89c9cee4899894d1ff3b2 Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Fri, 7 Aug 2009 21:18:44 +0100 Subject: [PATCH] revert a line of code to avoid unicode name mangling problems until there's time to fix it properly ... --- pyfpdb/fpdb_simple.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index 4594b3f4..699a9e8d 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -992,9 +992,9 @@ def recognisePlayerIDs(db, names, site_id): if len(ids) != len(names): notfound = [n for n in names if n not in ids] # make list of names not in database if notfound: # insert them into database - q_ins = "INSERT INTO Players (name, siteId) VALUES (%s, "+str(site_id)+")" - q_ins = q_ins.replace('%s', db.sql.query['placeholder']) - c.executemany(q_ins, [(n,) for n in notfound]) + #q_ins = "INSERT INTO Players (name, siteId) VALUES (%s, "+str(site_id)+")" + #q_ins = q_ins.replace('%s', db.sql.query['placeholder']) + c.executemany("INSERT INTO Players (name, siteId) VALUES (%s, "+str(site_id)+")", [(n,) for n in notfound]) q2 = "SELECT name,id FROM Players WHERE name=%s" % " OR name=".join(["%s" for n in notfound]) q2 = q2.replace('%s', db.sql.query['placeholder']) c.execute(q2, notfound) # get their new ids