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);