Posts Tagged ‘Zend_Db’

How to increase a database table column value in Zend Framework

Saturday, February 28th, 2009

... in a class extending Zend_Db_Table

$db = $this->getAdapter();
....
$db->update('table', array('views' => new <strong>Zend_Db_Expr</strong>("views + 1")), 'id = ' . $id);
....