Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.0RC2
-
Fix Version/s: 1.6.1
-
Component/s: Zend_Paginator
-
Labels:None
Description
When using the Zend_Paginator_Adapter_DBselect() on a select statement as such;
$select = $this->db->select()
->from("IPLog", "DISTINCT(IP)");
or
$select = $this->db->select()
->from("IPLog", "IP")
->DISTINCT(true);
the counting of rows goes wrong, since in my case there's 2 unique IP's in the table, but I get 43 since there's 43 rows in total. This causes my paginator controls to show more pages then there really are. The problem seems to be that the count() method of the DBselect adapter resets the columns, without checking for result limitting expressions.
//update;
Thanks updating to latest svn and using the group by did the trick, doesn't work with 1.6.0RC2 though, so any change made after that did the trick.
Could you please try this with the latest version from the SVN? There have been a lot of improvements to the DbSelect adapter since RC2.