T201704101138

This commit is contained in:
Leander
2017-04-10 11:38:29 +02:00
parent 63a67194ca
commit 766b226f84
2 changed files with 2 additions and 4 deletions

View File

@@ -28,9 +28,7 @@ if($uid == '') {
$cat = $category['name'];
$score = $db->query('SELECT "score" FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2',
array($uid, $cid))['data'][0]['score'];
if($score == null) {
$score = 0;
}
$score = $score == null ? 0 : +$score;
$place = $db->query(
'SELECT COUNT (*) FROM "Highscores"
WHERE "Categories_ID" = $1 AND "score" > $2',