Guest User

Untitled

a guest
Jul 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2.  
  3. class Answer extends BaseAnswer
  4. {
  5. public function preSave($obj)
  6. {
  7. if ($this->getIsTrue())
  8. {
  9. $q = Doctrine_Query::create()
  10. ->update('Answer')
  11. ->set('is_true', '0')
  12. ->where('question_id = ?', $this->getQuestionId());
  13.  
  14. $q->execute();
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment