이봐, 난 교리로 내 쿼리를 만드는 몇 가지 문제가 있습니다교리 쿼리 문제
내 SQL 쿼리는 다음과 같습니다: 그래서 bassicaly 내가 가지고 ROLE_ID = 20 모든 파일럿 직원을 선택합니다
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 = ?
)
비행기에 지정되지 않았습니다.
내 교리 쿼리 :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();
내 오류 : 나를 돕는
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
감사합니다, 데이비드
당신은 추가 시도 할 수
하위 쿼리에서 닫는 것을 잊어 버렸습니다. 쿼리가 그다지 크지 않기 때문에 성능 저하가 발생하는지는 알 수 없습니다. – DrColossos
@DrColossos 이것은 Tokenizer에 의해 오류가 발생하기 때문에 거의 확실합니다. – jeremiahd