diff options
| author | leak <leakzx@googlemail.com> | 2011-12-31 20:14:38 +0100 |
|---|---|---|
| committer | leak <leakzx@googlemail.com> | 2011-12-31 20:14:38 +0100 |
| commit | 73cf793e56b0750f717f31d91f54fdf94ff88682 (patch) | |
| tree | 2df88688ff0c8149d2fd6343c782346f89bab52e /src/server/game/Accounts/AccountMgr.cpp | |
| parent | ff8874574f61cf92d6a05fb3c834406651ba0aab (diff) | |
Core/DBLayer: Refactor prepared statement defines Note:
The new format for the middle section is a 3-letter upper case abbreviation of the sql command being executed (select -> SEL, update -> UPD, etc.)
{DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed}
Diffstat (limited to 'src/server/game/Accounts/AccountMgr.cpp')
| -rwxr-xr-x | src/server/game/Accounts/AccountMgr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Accounts/AccountMgr.cpp b/src/server/game/Accounts/AccountMgr.cpp index 6c3dd69c0da..7633d764bbd 100755 --- a/src/server/game/Accounts/AccountMgr.cpp +++ b/src/server/game/Accounts/AccountMgr.cpp @@ -37,14 +37,14 @@ AccountOpResult CreateAccount(std::string username, std::string password) if (GetId(username)) return AOR_NAME_ALREDY_EXIST; // username does already exist - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_ADD_ACCOUNT); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT); stmt->setString(0, username); stmt->setString(1, CalculateShaPassHash(username, password)); LoginDatabase.Execute(stmt); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_ADD_REALM_CHARS); + stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_REALM_CHARACTERS_INIT); LoginDatabase.Execute(stmt); @@ -112,7 +112,7 @@ AccountOpResult ChangeUsername(uint32 accountId, std::string newUsername, std::s normalizeString(newUsername); normalizeString(newPassword); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_USERNAME); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_USERNAME); stmt->setString(0, newUsername); stmt->setString(1, CalculateShaPassHash(newUsername, newPassword)); @@ -136,7 +136,7 @@ AccountOpResult ChangePassword(uint32 accountId, std::string newPassword) normalizeString(username); normalizeString(newPassword); - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPDATE_PASSWORD); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_PASSWORD); stmt->setString(0, CalculateShaPassHash(username, newPassword)); stmt->setUInt32(1, accountId); |
