If I want to use the Zend_Db_Table->update()
method to update my table with data, I cannot find anyway to use bind variables in the "where" clause.
The method signature is:
int update($data, array|string $where)
Usually you will call the method like this:
$table = new Bugs();
$data = array(
'updated_on' => '2007-03-23',
'bug_status' => 'FIXED'
);
$where = $table->getAdapter()->quoteInto('bug_id = ?', 1234);
$table->update($data, $where);
quoteInto
is just going to escape the variable, not bind it.
There needs to be a way to use bind variables, otherwise a DBMS is not going to cache this query effectivly.
Am I missing something, or is this an oversight on Zend's part?