correct DQL query

This commit is contained in:
Mathieu 2019-01-17 15:09:49 +01:00
parent 0337f252cd
commit cbb50013b3

View File

@ -13,7 +13,7 @@ class ItemController extends Controller {
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
// first, get the number of total item are available // first, get the number of total item are available
$total = $em $total = $em
->createQuery("COUNT (item.id) FROM ChillMyBundle:Item item") ->createQuery("SELECT COUNT (item.id) FROM ChillMyBundle:Item item")
->getSingleScalarResult(); ->getSingleScalarResult();
// get the PaginatorFactory // get the PaginatorFactory