ZF-7127: Problem with Where-clause in select for paginator

Issue Type: Bug Created: 2009-06-25T12:58:31.000+0000 Last Updated: 2009-08-29T09:00:53.000+0000 Status: Resolved Fix version(s): - 1.9.0 (31/Jul/09)

Reporter: Master Surfer (mastersurfer84) Assignee: Jurrien Stutterheim (norm2782) Tags: - Zend_Db_Select

  • Zend_Paginator

Related issues: - ZF-7259



Until version 1.8.3 the following code worked perfectly but with the update to ZF 1.8.4 the following error occurs: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'c.ModuleName' in 'where clause'

    $select = $this->db->select();
    $select->from(array("c" => "mvc_pagecalls"),
                      array("ModuleName", "ControllerName", "ActionName", "ObjectID"))
           ->where("c.ModuleName = ?", 'admin');
    $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbSelect($select));
    $paginator->setCurrentPageNumber($this->_getParam("page", 1));
    $this->view->paginator = $paginator;

so i tried to dump the sql-string ($select->__tostring) and execute it in the phpmyadmin. The query was valid and successful.

So it seems as the version 1.8.4 has a bug in Db_Select or Paginator.


Posted by Jurrien Stutterheim (norm2782) on 2009-06-25T14:03:15.000+0000

Resolved in r16293. Merged to release-1.8 in r16294.

Posted by Ramon Henrique Ornelas (ramon) on 2009-08-23T06:52:16.000+0000

Same problem occurred to me, I took the class Zend_Paginator_Adapter_DbSelect of the trunk.

Posted by Jurrien Stutterheim (norm2782) on 2009-08-26T07:54:25.000+0000

Ramon: can you try to reproduce the error and paste the corresponding query?

Posted by Ramon Henrique Ornelas (ramon) on 2009-08-29T09:00:47.000+0000

Jurrien Stutterheim: error was in version 1.8.4 solved my problem when I took the svn/trunk, and was resolved in version 1.9.

Reported in ZF-7259.

No problem.

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.