Zend framework 如何在Zend框架中编写查询?

Zend framework 如何在Zend框架中编写查询?,zend-framework,zend-db,Zend Framework,Zend Db,我的问题是 UPDATE clms_data SET product_price= Product_price+ current _Price where id = 440; 如何使用Zend_Db编写代码 $db = Zend_Db::factory('Pdo_Mysql', $dbConnect); $data = array('Product_price' => new Zend_Db_Expr('Product_price+current_Price')); $db->

我的问题是

 UPDATE clms_data
 SET product_price= Product_price+ current _Price where id = 440;
如何使用Zend_Db编写代码

$db = Zend_Db::factory('Pdo_Mysql', $dbConnect);
$data = array('Product_price' => new Zend_Db_Expr('Product_price+current_Price'));
$db->update('clms_data', $data, 'id = 440');
其中$dbConnect是您的连接阵列

其中$dbConnect是您的连接阵列