From f6b5e5f88a64a42ad3b1ef1c7d05d6d450ac7738 Mon Sep 17 00:00:00 2001 From: Leander Date: Thu, 6 Apr 2017 13:14:32 +0200 Subject: [PATCH] T201704081314 --- highscores.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highscores.php b/highscores.php index 8de6518..ce1a119 100644 --- a/highscores.php +++ b/highscores.php @@ -31,7 +31,7 @@ if($uid == '') { $place = $db->query( 'SELECT COUNT (*) FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2 AND "score" > $3', - array($uid, $cid, $score))['data'][0]['score']; + array($uid, $cid, $score))['data'][0]['count'] + 1; $cat_scores[] = array('id' => $cid, 'name' => $cat, 'score' => $score, 'place' => $place); } $data = array('score' => $score_all, 'place' => $place_all, 'all' => $all, 'categories' => $cat_scores);