I would like to know the number of row which are in my table TABLE and for which attribute name="joe"
Here the code I use so far but I retrieve the objects (which is just unnecessary, so not optimized)
$repository = $this->getDoctrine()->getManager()->getRepository('MyBundle:TABLE');
$name = "joe";
$liste = $repository->findBy(array('name' => $name));
$nombre = count($liste);
how can I achieved it with querybuilder using count? need to set parameter $name. All I ve seen so far have no parameter like this one, so do not know how this can work... (moreover I would like to avoid using paginator)
thanks.