Issues

ZF-3740: Counting results does not work in postgresql with order by in query

Description

This does not work in postgresql


SELECT COUNT(*) AS zend_paginator_row_count FROM users  order by name asc

it throws error ERROR: column "users.name" must appear in the GROUP BY clause or be used in an aggregate function

You shoud shoul also reset order by


$rowCount   = clone $this->_select;
$rowCount->reset(Zend_Db_Select::COLUMNS)
              ->reset(Zend_Db_Select::ORDER)
               >columns($expression);

Comments

Resolved in revision 10351