Core/CharDB Cleanup: alter corpse table making column names lowerCamel and move all queries to prepared statements.

NOTICE: column can be named `guid` only if it represents character guid. All other guids will be renamed to reflect their purpose (like corpseGuid in this specific case)
This commit is contained in:
Azazel
2011-04-11 14:39:00 +06:00
parent 553d8d7016
commit 5357b1ba77
10 changed files with 108 additions and 74 deletions
+3 -1
View File
@@ -1243,7 +1243,9 @@ void World::SetInitialWorldSettings()
LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realmID);
///- Remove the bones (they should not exist in DB though) and old corpses after a restart
CharacterDatabase.PExecute("DELETE FROM corpse WHERE corpse_type = '0' OR time < (UNIX_TIMESTAMP()-'%u')", 3 * DAY);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_OLD_CORPSES);
stmt->setUInt32(0, 3 * DAY);
CharacterDatabase.Execute(stmt);
///- Load the DBC files
sLog->outString("Initialize data stores...");