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');
Mmm, you question lacks a lot of information. Is this what you need?
You can't select more than 1 column in a sub query\correlated query in the select list, which was probably showed to you in the error message.
EDIT: Better of do that: