ZF-6562: Zend_Paginator_Adapter_DbSelect fails on HAVING clause

Issue Type: Bug Created: 2009-05-06T09:14:59.000+0000 Last Updated: 2009-06-18T21:24:06.000+0000 Status: Resolved Fix version(s): - 1.8.4 (23/Jun/09)

Reporter: Anselm Föhr (anselm) Assignee: Jurrien Stutterheim (norm2782) Tags: - Zend_Paginator

Related issues: Attachments:


Zend_Paginator_Adapter_DbSelect seems to create a wrong query for getting the count when the query has a 'HAVING' in it.

Simplified example:

$select = $db->select() ->from('user', 'user_id AS foo') ->having('foo > ?', 4);

// query is: SELECT user.user_id AS foo FROM user HAVING (foo > 4)

$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbSelect($select));

Created query is: SELECT COUNT(*) AS zend_paginator_row_count FROM user HAVING (foo > 4)

which is obviously not working.

Haven't tested it yet in 1.8.0.

BR anselm


Posted by Jurrien Stutterheim (norm2782) on 2009-06-18T21:24:06.000+0000

Resolved in r16157 and merged to release-1.8 in r16158

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.