/** * Create a new question * @param question $question * @param unknown_type $connection */ public function newQuestion($question, $connection) { $connection->exec("INSERT INTO `" . $GLOBALS['dbPrefix'] . "question_question` (`set`, `question`, `mode`) VALUES (" . $this->setid . ", '" . $question->getQuestion() . "', '" . $question->getMode() . "')"); $question->setId($connection->lastInsertId()); array_push($this->questions, $question); }