T201704210923

This commit is contained in:
Leander
2017-04-21 09:23:35 +02:00
parent 9915ff92fa
commit 35dec5e81e

View File

@@ -31,7 +31,7 @@ if($cid == -1) {
LIMIT $2 OFFSET $3', array($cid, $limit, $offset))['data'];
foreach($overview as $row) {
$name = $row['name'];
$score = $score != NULL ? ($row['score']) : -1;
$score = (isset($score) AND $score != NULL) ? ($row['score']) : -1;
$place = $db->query('SELECT COUNT(*) FROM "Highscores" WHERE "score" > $1 AND "Categories_ID" = $2',
array($score, $cid))['data'][0]['count'] + 1;
$data[] = array('place' => $place, 'name' => $name, 'score' => $score);