T201704051634

This commit is contained in:
Leander
2017-04-05 16:34:24 +02:00
parent 292dd868bb
commit 82d97b81b5

View File

@@ -60,7 +60,7 @@ if($uid == '') {
$old_hi_questions = $old_hi_data['answered_questions'];
$old_hi_score_total = $old_hi_score_pq * $old_hi_questions;
$new_hi_score_total = $old_hi_score_total + $score;
$new_hi_questions = $old_hi_questions++;
$new_hi_questions = $old_hi_questions + 1;
$new_hi_score_pq = intval($new_hi_score_total / $new_hi_questions);
$db->query('UPDATE "Highscores" SET "score" = $1, "answered_questions" = $2',
array($new_hi_score_pq, $new_hi_questions));