From 4a9c400cbe27112b9c51fa0eff057e4f4d972568 Mon Sep 17 00:00:00 2001 From: Leander Date: Mon, 10 Apr 2017 13:51:55 +0200 Subject: [PATCH] T201704101351 --- allhighscores.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allhighscores.php b/allhighscores.php index 3d00386..7406696 100644 --- a/allhighscores.php +++ b/allhighscores.php @@ -13,8 +13,8 @@ $limit = isset($_GET['limit']) ? $_GET['limit'] : 10; $offset = isset($_GET['offset']) ? $_GET['offset'] : 0; $db = new Database(); -$overview = $db->query('SELECT "name", "highscore" FROM "Users" LIMIT $1 OFFSET $2 - ORDER BY "highscore" DESC', array($limit, $offset))['data']; +$overview = $db->query('SELECT "name", "highscore" FROM "Users" ORDER BY "highscore" DESC + LIMIT $1 OFFSET $2', array($limit, $offset))['data']; foreach($overview as $row) { $name = $row['name']; $score = $row['highscore'];