From 85372407703dba9b3b7d166a5db13402836ba130 Mon Sep 17 00:00:00 2001 From: Leander Date: Thu, 20 Apr 2017 14:58:12 +0200 Subject: [PATCH] T201704201458 --- allhighscores.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/allhighscores.php b/allhighscores.php index 701c1fa..85a2904 100644 --- a/allhighscores.php +++ b/allhighscores.php @@ -24,9 +24,10 @@ if($cid == -1) { $data[] = array('place' => $place, 'name' => $name, 'score' => $score); } } else { - $overview = $db->query('SELECT u."name", h."score" ISNULL(h."score", -1) + $overview = $db->query('SELECT u."name", h."score" 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) {