ZF-4032: Paginator DBselect adapter not propperly counting rows when using DISTINCT()
When using the Zend_Paginator_Adapter_DBselect() on a select statement as such;
$select = $this->db->select() ->from("IPLog", "DISTINCT(IP)");
$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.
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.