T201704031307
This commit is contained in:
@@ -35,6 +35,14 @@ class Question
|
||||
$this->category = $c;
|
||||
}
|
||||
|
||||
public static function get_next_question($db, $uid) {
|
||||
$qid = $db->query('SELECT "Questions_ID" FROM "GamesQuestions" WHERE "Games_ID" = $1 LIMIT 1', array($uid))['data'][0]['ID'];
|
||||
$question = new Question($db, $qid);
|
||||
$db->query('DELETE FROM "GamesQuestions" WHERE "Games_ID" = $1 AND "Questions_ID" = $2', array($uid, $qid));
|
||||
$question_object = $question->get_question_object();
|
||||
return $question_object;
|
||||
}
|
||||
|
||||
// Create the question message for API.
|
||||
function get_question_object() {
|
||||
$question_object = array(
|
||||
|
||||
Reference in New Issue
Block a user