1

My Query is

 UPDATE clms_data
 SET product_price= Product_price+ current _Price where id = 440;

how can write code to this using Zend_Db.

1 Answer 1

1
$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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.