构建"UPDATE表SET date = NOW()WHERE id = 1"查询的方法是什么?
$table->update(array('date' => 'NOW()'), 'id = 1');
Run Code Online (Sandbox Code Playgroud)
上面的代码无法正常工作.
$table->update(array('date' => new Zend_Db_Expr('NOW()'), 'id = 1');
Run Code Online (Sandbox Code Playgroud)
看到:
http://framework.zend.com/apidoc/core/Zend_Db/Expr/Zend_Db_Expr.html
| 归档时间: |
|
| 查看次数: |
1429 次 |
| 最近记录: |