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
This commit is contained in:
ucorina 2012-07-10 11:53:04 +00:00
parent fb8953c837
commit 485d7f043c

View file

@ -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() : '')