diff --git a/highscores.php b/highscores.php index 29a49d1..8de6518 100644 --- a/highscores.php +++ b/highscores.php @@ -27,11 +27,11 @@ if($uid == '') { $cid = $category['ID']; $cat = $category['name']; $score = $db->query('SELECT "score" FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2', - array($uid, $cid)['data'][0]['score']); + array($uid, $cid))['data'][0]['score']; $place = $db->query( 'SELECT COUNT (*) FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2 AND "score" > $3', - array($uid, $cid, $score)); + array($uid, $cid, $score))['data'][0]['score']; $cat_scores[] = array('id' => $cid, 'name' => $cat, 'score' => $score, 'place' => $place); } $data = array('score' => $score_all, 'place' => $place_all, 'all' => $all, 'categories' => $cat_scores);