T201704041122
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
|
||||
$correct_answer = $db->query('SELECT "current_right_answer" FROM "Games" WHERE "ID" = $1', array($uid))
|
||||
['data'][0]['current_right_answer'];
|
||||
print_r(pg_last_error());
|
||||
$correct = $correct_answer == $chosen_answer ? true : false;
|
||||
$score = $correct_answer == $chosen_answer ? calculate_points($time) : 0;
|
||||
if($uid == '') {
|
||||
@@ -34,6 +33,9 @@
|
||||
$error = 13102;
|
||||
} else if($chosen_answer == -1) {
|
||||
$error = 13103;
|
||||
} else if($db->query('SELECT EXISTS (SELECT 1 FROM "Games" WHERE "ID" = $1)', array($uid))['data'][0]['exists'] == 'f') {
|
||||
$error = 13104;
|
||||
print 'no game';
|
||||
} else {
|
||||
// points in table
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user