Question

I'm trying to create a DQL query with two conditions in a left join. It's ok with one condition, but impossible to find the semantic for more conditions. Just below a SQL example about what I'm trying to write in DQL:

SELECT 
u.id AS uid,
FROM user u 
LEFT JOIN phonenumber p ON (u.id = p.user_id AND u.status='1')
HAVING COUNT(p.id) > 3

Thanks

Was it helpful?

Solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top