I'd like to express the following sql query in Symfony 1.4 using Doctrine's Query Builder :
select `user_agent`
from ticket
WHERE EXISTS (SELECT *
FROM log
WHERE ticket.id = log.ticket_id AND log.task_id = 1)
How I can express the "where exist....." condition?
You can use exists statement in where clause as other conditions. In your case it would look something like: