aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeo2003 <none@none>2008-10-06 13:49:41 -0500
committerNeo2003 <none@none>2008-10-06 13:49:41 -0500
commit24d5240a767f6a0cbb94a710df7103e657a0bfbd (patch)
treec2ffc88198dbb3e986a060ab96ae13c792cab12e /src
parent954fd22ab06ee557b2932748afe8db410e3d88cb (diff)
[svn] * Updated character create query to use proper LEFT JOIN instead of NOT IN (SELECT...
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/AccountMgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/AccountMgr.cpp b/src/game/AccountMgr.cpp
index 3b14db46dba..158e1b96a17 100644
--- a/src/game/AccountMgr.cpp
+++ b/src/game/AccountMgr.cpp
@@ -57,7 +57,7 @@ AccountOpResult AccountMgr::CreateAccount(std::string username, std::string pass
if(!loginDatabase.PExecute("INSERT INTO account(username,sha_pass_hash,joindate) VALUES('%s',SHA1(CONCAT('%s',':','%s')),NOW())", username.c_str(), username.c_str(), password.c_str()))
return AOR_DB_INTERNAL_ERROR; // unexpected error
- loginDatabase.Execute("INSERT INTO realmcharacters (realmid, acctid, numchars) SELECT realmlist.id, account.id, 0 FROM account, realmlist WHERE account.id NOT IN (SELECT acctid FROM realmcharacters)");
+ loginDatabase.Execute("INSERT INTO realmcharacters (realmid, acctid, numchars) SELECT realmlist.id, account.id, 0 FROM realmlist,account LEFT JOIN realmcharacters ON acctid=account.id WHERE acctid IS NULL");
return AOR_OK; // everything's fine
}