From 856c1154355a040489f45e40a29a4067051c9482 Mon Sep 17 00:00:00 2001 From: Leander Date: Thu, 20 Apr 2017 10:00:36 +0200 Subject: [PATCH] T201704201000 --- allhighscores.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/allhighscores.php b/allhighscores.php index 33787ef..a1147db 100644 --- a/allhighscores.php +++ b/allhighscores.php @@ -41,10 +41,8 @@ if($cid == -1) { $all_users = $db->query('SELECT "ID", "name" FROM "Users" ORDER BY "name"')['data']; print_r($all_users); foreach($all_users as $user) { - print_r($db->query('SELECT EXISTS (SELECT * FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2)', - array($user['ID'], $cid))['data'][0]['exists']); - if($db->query('SELECT exists FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2', - array($user['ID']))['data'][0]['exists'] == 'f') { + if($db->query('SELECT EXISTS (SELECT * FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2)', + array($user['ID'], $cid))['data'][0]['exists'] == 'f') { $name = $user['name']; $score = -1; $place = $all_cat_highscores + 1;