开发者

How to write query in Zend framework?

My Query is

 UPDATE clms_data
 SET product_price= Product_price+ current _Price where id = 4开发者_开发知识库40;

how can write code to this using 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');

where $dbConnect is your connection array

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜