Jump to content

Zend Framework $db->update() Simple math


GregL83

Recommended Posts

Hey,

 

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?

 

i.e.

 

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

 

Thanks in advance! :)

Link to comment
https://forums.phpfreaks.com/topic/219340-zend-framework-db-update-simple-math/
Share on other sites

Archived

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

×
×
  • 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.