Core/DB: Some DB improvements
This commit is contained in:
@@ -79,13 +79,12 @@ namespace Game.Arenas
|
||||
uint oldMSTime = Time.GetMSTime();
|
||||
|
||||
// Clean out the trash before loading anything
|
||||
DB.Characters.Execute("DELETE FROM arena_team_member WHERE arenaTeamId NOT IN (SELECT arenaTeamId FROM arena_team)"); // One-time query
|
||||
DB.Characters.DirectExecute("DELETE FROM arena_team_member WHERE arenaTeamId NOT IN (SELECT arenaTeamId FROM arena_team)"); // One-time query
|
||||
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
SQLResult result = DB.Characters.Query("SELECT arenaTeamId, name, captainGuid, type, backgroundColor, emblemStyle, emblemColor, borderStyle, borderColor, " +
|
||||
// 9 10 11 12 13 14
|
||||
"rating, weekGames, weekWins, seasonGames, seasonWins, rank FROM arena_team ORDER BY arenaTeamId ASC");
|
||||
|
||||
if (result.IsEmpty())
|
||||
{
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 arena teams. DB table `arena_team` is empty!");
|
||||
|
||||
Reference in New Issue
Block a user