ZF-5295: Failure on Oracle database
The DbSelect adapter fails under Oracle, because Oracle does not support statements like:
Instead, in Oracle, the statement should be:
I made a quick fix by changing Zend/Paginator/Adapter/DbSelect.php, but then this would only support Oracle(which is no problem in my case) The fix is not perfect, there is a chance of failure, but I suppose the '###' string could be changed to something unique.
187,188d186 < //ORACLE COUNT(DISTINCT col1||col2..) fix < $groupPart = str_replace(",", "||'###'||", $groupPart);
$select = new Zend_Db_Select($this->db); $select->from("product_transfers", array( "quantity" => "SUM(quantity)", "product_id", "name", "batch_number")); $select->group(array( "product_id", "name", "batch_number")); $paginator = Zend_Paginator::factory($select);