Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. $q = new Doctrine_RawSql();
  2. $q->select('{f.*},{ft.*}')
  3. ->from('Forum f')
  4. ->leftJoin('Status s ON s.libelle LIKE "Published"')
  5. ->leftJoin('Forum_topic ft ON f.id = ft.forum_id AND ft.status_id = s.id')
  6. ;
  7.  
  8. $q->addComponent('f', 'Forum f');
  9. $q->addComponent('ft', 'ForumTopic');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement