Zend Framework

Incorrect example of Zend_Db_Table_Select::where

Details

  • Type: Docs:  Problem Docs: Problem
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.9.6
  • Labels:
    None
  • Language:
    English

Description

Example 15.101 [1] on the Zend_Db_Table documentation page shows an example of code that doesn't actually work. It uses an array($condition => $value) in the where clause:

$select = $table->select()->where(array('bug_status = ?' => 'NEW'))

But as far as I can see, this isn't implemented. I think it should be changed to:

$select = $table->select()->where('bug_status = ?', 'NEW')

[1] http://framework.zend.com/manual/en/zend.db.table.html#zend.db.table.fetch-all.example2

Activity

Hide
Luká? Lalinský added a comment -

Patch to fix the issue.

Show
Luká? Lalinský added a comment - Patch to fix the issue.
Hide
Jordan Ryan Moore added a comment -

Fixed in trunk and merged into the 1.9 release branch.

Show
Jordan Ryan Moore added a comment - Fixed in trunk and merged into the 1.9 release branch.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: