diff --git a/allhighscores.php b/allhighscores.php new file mode 100644 index 0000000..507c168 --- /dev/null +++ b/allhighscores.php @@ -0,0 +1,25 @@ +query('SELECT "name", "highscore" FROM "Users" LIMIT $1 OFFSET $2', array($limit, $offset))['data']; +foreach($overview as $row) { + $name = $row['name']; + $score = $row['highscore']; + $place = $db->query('SELECT COUNT(*) FROM "Users" WHERE "highscore" > $1', array($score))['data'][0]['count']; + $data[] = array('place' => $place, 'name' => $name, 'score' => $score); +} + +$response = Database::create_response($data, $error); +print_r($response); \ No newline at end of file