开发者

dql and leftjoin

开发者 https://www.devze.com 2023-01-23 09:00 出处:网络
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 try

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开发者_C百科 (u.id = p.user_id AND u.status='1')
HAVING COUNT(p.id) > 3

Thanks


Did you try ON and/or WITH keywords?

0

精彩评论

暂无评论...
验证码 换一张
取 消