small fix

This commit is contained in:
kremsy 2014-01-31 19:32:50 +01:00 committed by Steffen Schröder
parent ab524cc1f7
commit b889bd9329

View File

@ -105,7 +105,7 @@ class StatisticManager {
$mysqli = $this->maniaControl->database->mysqli; $mysqli = $this->maniaControl->database->mysqli;
$statId = $this->getStatId($statName); $statId = $this->getStatId($statName);
$query = "SELECT playerId, serverIndex, value FROM `" . self::TABLE_STATISTICS . "` WHERE statId = " . $statId . " ORDER BY value DESC;"; $query = "SELECT playerId, serverIndex, value FROM `" . self::TABLE_STATISTICS . "` WHERE statId = " . $statId . " ORDER BY value DESC LIMIT 100;";
$result = $mysqli->query($query); $result = $mysqli->query($query);
if (!$result) { if (!$result) {
@ -126,6 +126,7 @@ class StatisticManager {
} }
} }
arsort($stats);
$result->close(); $result->close();
return $stats; return $stats;
} }