added null opt 2 hs

This commit is contained in:
Leander
2017-04-26 10:05:52 +02:00
parent 13899443b6
commit 57514b22ce

View File

@@ -15,7 +15,8 @@ $offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
$db = new Database(); $db = new Database();
if($cid == -1) { if($cid == -1) {
$overview = $db->query('SELECT "name", "highscore" FROM "Users" ORDER BY "highscore" DESC, "name" ASC $overview = $db->query('SELECT "name", COALESCE("highscore", -1) as "highscore"
FROM "Users" ORDER BY COALESCE("highscore", -1) DESC, "name" ASC
LIMIT $1 OFFSET $2', array($limit, $offset))['data']; LIMIT $1 OFFSET $2', array($limit, $offset))['data'];
foreach($overview as $row) { foreach($overview as $row) {
$name = $row['name']; $name = $row['name'];