Zend_Db_Adapter::update()
returns the number of rows affected by the update operation.
What is best way to determine if the query was successful?
Maybe:
$data = array(
'updated_on' => '2007-03-23',
'bug_status' => 'FIXED'
);
$result = $db->update('bugs', $data, 'bug_id = 2');
if ($result < $numRows) {//pass in numRows as method arg or hardcode integer.
//handle error
} else {
return TRUE;
}
Try something like this with the idea being you want to verify that the number of records you wanted updated got updated.