From ad894ac4323a4c38d2f6337f40358b87d540e73b Mon Sep 17 00:00:00 2001 From: Leander Date: Fri, 21 Apr 2017 09:28:35 +0200 Subject: [PATCH] T201704210928 --- allhighscores.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allhighscores.php b/allhighscores.php index 9cda715..0bc2e46 100644 --- a/allhighscores.php +++ b/allhighscores.php @@ -24,10 +24,10 @@ 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) AS "score" FROM "Users" u LEFT OUTER JOIN "Highscores" h ON u."ID" = h."Users_ID" WHERE h."Categories_ID" = $1 - ORDER BY h."score" DESC + ORDER BY COALESCE(h."score", -1) DESC LIMIT $2 OFFSET $3', array($cid, $limit, $offset))['data']; foreach($overview as $row) { $name = $row['name'];