/** * Writes the answer to the database, either updating it * when it already exists, or inserting it when it doesn't. * * @since 0.1 * * @return boolean Success indicator */ public function writeToDB() { $success = parent::writeToDB(); if ($success) { $this->writeAnswersToDB(); } return $success; }
/** * Writes the surveyand it's questions to the database, either updating it * when it already exists, or inserting it when it doesn't. * * @since 0.1 * * @return boolean Success indicator */ public function writeToDB() { $success = parent::writeToDB(); if ($success) { $success = $this->writeQuestionsToDB(); } return $success; }