From 485d7f043c90f25e1e433d53afe3e5314e9559e2 Mon Sep 17 00:00:00 2001 From: ucorina Date: Tue, 10 Jul 2012 11:53:04 +0000 Subject: [PATCH] Issue 2131: If page navigation and group by exist in xml query, total count doesn't work well git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10863 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DBMysql.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index 0aa3cdd58..b5be890d4 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -582,7 +582,7 @@ class DBMysql extends DB { $uses_groupby = $queryObject->getGroupByString() != ''; if($uses_distinct || $uses_groupby) { $count_query = sprintf('select %s %s %s %s' - , $temp_select + , $temp_select == '*' ? '1' : $temp_select , 'FROM ' . $queryObject->getFromString($with_values) , ($temp_where === '' ? '' : ' WHERE '. $temp_where) , ($uses_groupby ? ' GROUP BY ' . $queryObject->getGroupByString() : '')