ZF-2863: Zend_Db_Table - Improvement for "where" parameter in update() method



When inserting or fetching in a DB, the where condition must be of the following syntax (when using an array):

$where = array( 'id_photo = ?' => $pic, 'member_id = ?' => $memberId );

But when updating, the above where condition will generate a wrong Sql, and need to apply another syntax , like this one:

$where = array( $db->quoteInto('id_photo = ?', $pic), $db->quoteInto('member_id = ?', $memberId) );

This is pretty quite confusing and incoherent Also, when the first syntax is used in the update method, the whole records can change.


Please categorize/fix as needed.

If I'm not wrong, the same happens with the parameter of delete function

Reassigning to Ralph to bring closure to this issue.

Is there any update on this issue?

What is the "wrong" SQL syntax which is produced?

Closing, as no further update supplied. Correct method for parameter binding for both update and delete methods has been added to the docs since this issue was opened. see ZF-7626 for more details