T201704101114

This commit is contained in:
Leander
2017-04-10 11:14:19 +02:00
parent 258d66e404
commit 63a67194ca

View File

@@ -37,6 +37,10 @@ if($uid == '') {
$error = 13104;
} else {
//set time and points
$old_q_count = $db->query('SELECT "answered_questions" FROM "Games" WHERE "ID" = $1',
array($uid))['data'][0]['answered_questions'];
$new_q_count = $old_q_count + 1;
$db->query('UPDATE "Games" SET "answered_questions" = $1 WHERE "ID" = $2', array($new_q_count, $uid));
$old_points = $db->query('SELECT "current_score" FROM "Games" WHERE "ID" = $1', array($uid))
['data'][0]['current_score'];
$new_points = $old_points + $score;