From cbb50013b3f090ef6eaa551f174561eb0c31c758 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Thu, 17 Jan 2019 15:09:49 +0100 Subject: [PATCH] correct DQL query --- source/development/pagination/example.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/development/pagination/example.php b/source/development/pagination/example.php index bfcac41eb..6ed1e68ef 100644 --- a/source/development/pagination/example.php +++ b/source/development/pagination/example.php @@ -13,7 +13,7 @@ class ItemController extends Controller { $em = $this->getDoctrine()->getManager(); // first, get the number of total item are available $total = $em - ->createQuery("COUNT (item.id) FROM ChillMyBundle:Item item") + ->createQuery("SELECT COUNT (item.id) FROM ChillMyBundle:Item item") ->getSingleScalarResult(); // get the PaginatorFactory