T201704101114
This commit is contained in:
@@ -37,6 +37,10 @@ if($uid == '') {
|
|||||||
$error = 13104;
|
$error = 13104;
|
||||||
} else {
|
} else {
|
||||||
//set time and points
|
//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))
|
$old_points = $db->query('SELECT "current_score" FROM "Games" WHERE "ID" = $1', array($uid))
|
||||||
['data'][0]['current_score'];
|
['data'][0]['current_score'];
|
||||||
$new_points = $old_points + $score;
|
$new_points = $old_points + $score;
|
||||||
|
|||||||
Reference in New Issue
Block a user