Core/DBLayer: Convert PExecute() queries to prepared statements No. 1

This commit is contained in:
leak committed 2011-12-25 18:13:21 +01:00
1 parent 9b8d18e7cd
commit ef17c05dec
14 files changed
+249 -138

No files matched your search

+7 -1
View File
@@ -529,7 +529,13 @@ void WorldSession::LogoutPlayer(bool Save)
///- Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
//No SQL injection as AccountId is uint32
CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = '%u'", GetAccountId());
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ACCOUNT_ONLINE);
stmt->setUInt32(0, GetAccountId());
CharacterDatabase.Execute(stmt);
sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
}