Reputation: 58
I am using Zend framework 1.12. i want to know syntax of update query in Zend framework . My update query format is:
update `product` SET qty=qty+1 where uid=2354
what will qty=qty+1
syntex in zf1
Upvotes: 2
Views: 312
Reputation: 133
You must use this code in class that extends Zend_Db_Table_Abstract
$whereQuery = array('uid = ?' => 2354);
$dataQuery = array('qty' => new Zend_Db_Expr('qty + 1'));
$this->update($dataQuery, $whereQuery);
Upvotes: 2