Index: trunk/core/kernel/db/dblist.php =================================================================== diff -u -N -r2761 -r2910 --- trunk/core/kernel/db/dblist.php (.../dblist.php) (revision 2761) +++ trunk/core/kernel/db/dblist.php (.../dblist.php) (revision 2910) @@ -272,12 +272,22 @@ } $system_sql = $this->GetSelectSQL(true,true); - if ($system_sql == $all_sql) { //no need to query the same again + if($system_sql == $all_sql) //no need to query the same again + { $this->NoFilterCount = $this->RecordsCount; return; } + $sql = $this->getCountSQL($system_sql); - $this->NoFilterCount = (int)$this->Conn->GetOne($sql); + if( $this->GetGroupClause() ) + { + $this->NoFilterCount = count( $this->Conn->GetCol($sql) ); + } + else + { + $this->NoFilterCount = (int)$this->Conn->GetOne($sql); + } + $this->Counted = true; }