T201704210928

This commit is contained in:
Leander
2017-04-21 09:28:35 +02:00
parent 35dec5e81e
commit ad894ac432

View File

@@ -24,10 +24,10 @@ if($cid == -1) {
$data[] = array('place' => $place, 'name' => $name, 'score' => $score);
}
} else {
$overview = $db->query('SELECT u."name", h."score"
$overview = $db->query('SELECT u."name", COALESCE(h."score", -1) AS "score"
FROM "Users" u LEFT OUTER JOIN "Highscores" h ON u."ID" = h."Users_ID"
WHERE h."Categories_ID" = $1
ORDER BY h."score" DESC
ORDER BY COALESCE(h."score", -1) DESC
LIMIT $2 OFFSET $3', array($cid, $limit, $offset))['data'];
foreach($overview as $row) {
$name = $row['name'];