diff --git a/DatabaseManager.cs b/DatabaseManager.cs index 249540b..0fac46c 100644 --- a/DatabaseManager.cs +++ b/DatabaseManager.cs @@ -369,7 +369,7 @@ public PlayerData QueryById(CSteamID steamId, bool cached = true) MySqlCommand command = Connection.CreateCommand(); command.Parameters.AddWithValue("@steamid", steamId); command.Parameters.AddWithValue("@instance", InstanceID); - command.CommandText = "SELECT * FROM (SELECT a.SteamID, a.SteamName, a.CharName, a.IP, a.LastLoginGlobal, a.TotalPlayTime, a.LastServerID, b.ServerID, b.LastLoginLocal, b.CleanedBuildables, b.CleanedPlayerData, c.ServerName AS LastServerName FROM `" + Table + "` AS a LEFT JOIN `" + TableServer + "` AS b ON a.SteamID = b.SteamID LEFT JOIN `" + TableInstance + "` AS c ON a.LastServerID = c.ServerID WHERE (b.ServerID = @instance OR b.ServerID = a.LastServerID OR b.ServerID IS NULL) AND a.SteamID = @steamid ORDER BY b.LastLoginLocal ASC) AS g GROUP BY g.SteamID"; + command.CommandText = "SELECT * FROM (SELECT a.SteamID, a.SteamName, a.CharName, a.IP, a.LastLoginGlobal, a.TotalPlayTime, a.LastServerID, b.ServerID, b.LastLoginLocal, b.CleanedBuildables, b.CleanedPlayerData, c.ServerName AS LastServerName FROM `" + Table + "` AS a LEFT JOIN `" + TableServer + "` AS b ON a.SteamID = b.SteamID LEFT JOIN `" + TableInstance + "` AS c ON a.LastServerID = c.ServerID WHERE (b.ServerID = @instance OR b.ServerID = a.LastServerID OR b.ServerID IS NULL) AND a.SteamID = @steamid ORDER BY b.LastLoginLocal ASC) AS g"; reader = command.ExecuteReader(); if (reader.Read()) { @@ -803,4 +803,4 @@ public enum OptionType Buildables, PlayerFiles, } -} \ No newline at end of file +}