Jump to content


This topic is now archived and is closed to further replies.


Zend Framework $db->update() Simple math

Recommended Posts



I'm trying to run a update using the db adapter object in zend framwork.  I want to have simple math in the sql statement using the update function.  Is this possible?




$data = array(
   'number' => 'number + 1'
$where = array(
   'id = ?' => 1
$db->update('sampleTable', $data, $where);


Thanks in advance! :)

Share this post

Link to post
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.