I have the DQL like this:
$sql = $qb->select('
c.login
, c.id
, i.count
')
->from('customer','c')
->leftJoin(__NAMESPACE__ .'\\'.'Item','i','WITH','c.id = i.owner_id')
->where('c.login = :login')->setParameter('login',$login)
->groupBy('
c.id
, c.login
, i.count
')
;
I want to multi condition left join like this in SQl:
SELECT
c.login
, c.id
, i.count
FROM
Customer c
LEFT JOIN
Item i
ON
c.id = i.owner_id
AND
i.id = "adc"
WHERE
c.account = 'Personal'
GROUP BY
c.login
, c.id
, i.count
Could someone translate into DQL
for me?
I can't let i.id = "adc"
in where because the left table data would not show all.
Thanks.