Hey I have some problems creating my query into doctrine:
My sql query looks like this:
select *
from fs_employee
where role_id = ?
and
id not in
(select e.id
from fs_employee e, fs_plane p
where role_id = ?
and p.pilot_id = e.id
and e.player_id = ?
)
So bassicaly I want to select every pilot employee with role_id = 20 that has not been assigned to a plane.
My doctrine query:
Doctrine_Query::Create()
->from('FsEmployee e')
->where('e.role_id = ?', $role)
->andWhere('e.id NOT IN (SELECT e.id FROM FsEmployee e, e.FsPlane p where e.role_id = ? and e.player_id = ?', $role, $id)
->execute();
My error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261904 bytes) in C:\sxampp\php\PEAR\symfony\plugins\sfDoctrinePlugin\lib\vendor\doctrine\Doctrine\Query\Tokenizer.php on line 329
Thanks for helping me out, David