diff --git a/allhighscores.php b/allhighscores.php index 85a2904..1625245 100644 --- a/allhighscores.php +++ b/allhighscores.php @@ -24,10 +24,9 @@ if($cid == -1) { $data[] = array('place' => $place, 'name' => $name, 'score' => $score); } } else { - $overview = $db->query('SELECT u."name", h."score" + $overview = $db->query('SELECT u."name", COALESCE(h."score", -1) FROM "Users" u LEFT OUTER JOIN "Highscores" h ON u."ID" = h."Users_ID" WHERE h."Categories_ID" = $1 - AND COALESCE (h."score", -1) ORDER BY h."score" DESC LIMIT $2 OFFSET $3', array($cid, $limit, $offset))['data']; foreach($overview as $row) {