【发布时间】:2011-06-12 10:41:52
【问题描述】:
使用 Zend 框架,有没有办法使用 quoteInto 方法将多个条件传递给更新语句?我找到了一些关于这个问题的参考资料,但我正在寻找一种无需扩展 Zend_Db 或无需串联的受支持方式。
$db = $this->getAdapter();
$data = array('profile_value' => $form['profile_value']);
$where = $db->quoteInto('user_id = ?', $form['id'])
. $db->quoteInto(' AND profile_key = ?', $key);
$this->update($data, $where);
参考文献
【问题讨论】: