Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Answer extends BaseAnswer
- {
- public function preSave($obj)
- {
- if ($this->getIsTrue())
- {
- $q = Doctrine_Query::create()
- ->update('Answer')
- ->set('is_true', '0')
- ->where('question_id = ?', $this->getQuestionId());
- $q->execute();
- }
- }
- }
Add Comment
Please, Sign In to add comment