I Have Table Actions with the following fields :
- idAction
- Cloture
- Date
I'd Like to loop through and display a list of all idAction
In my DB + idAction
with Cloture = 0
Group By the same Date (both of them).
I tried below method. But it doesn't work. Can anyone help me?
$query = $this->getEntityManager()->createQuery(
'SELECT COUNT(a.idAction) AS nmbreAction , week(a.dateOuverture) AS week,( SELECT COUNT(c.idAction) , week(c.dateOuverture) FROM ActionActionBundle:Action c
WHERE c.cloture = 0 ) AS nmbreRetard FROM ActionActionBundle:Action a
GROUP BY week');