diff --git a/allhighscores.php b/allhighscores.php index c0ce8f2..c4e905d 100644 --- a/allhighscores.php +++ b/allhighscores.php @@ -15,7 +15,8 @@ $offset = isset($_GET['offset']) ? $_GET['offset'] : 0; $db = new Database(); if($cid == -1) { - $overview = $db->query('SELECT "name", "highscore" FROM "Users" ORDER BY "highscore" DESC, "name" ASC + $overview = $db->query('SELECT "name", COALESCE("highscore", -1) as "highscore" + FROM "Users" ORDER BY COALESCE("highscore", -1) DESC, "name" ASC LIMIT $1 OFFSET $2', array($limit, $offset))['data']; foreach($overview as $row) { $name = $row['name'];