doctrine how to write WhereIn() with another sql query inside
问题 i have the folowing query in SQL ... where group_id IN (select group_id from alert where monitor_id = 4); I want to write it in Doctrine but i don't know how to add the IN select into WHEREIN() clause ! any idea ? this is what i did $q = $this->createQuery('u') ->select('u.email_address') ->distinct(true) // ->from('sf_guard_user u') ->innerJoin('u.sfGuardUserGroup ug') ->where('ug.group_id IN(select group_id from alert where monitor_id=?',$monitor); $q->execute(); In the sfGuardUserTable