views:

42

answers:

1

I need to execute this simple mysql query in Zend;

"UPDATE `table` SET `field`='field'+1 WHERE `field`>'" . $var . "'"

How can I do this with Zend update;

$this->update($data, $where);

But we hasn't data, we have only where.

+1  A: 

How can you update a table if you don't know what are you going to update.

By the way, this is what I found in the Zend Framework Documentation

$table = new Bugs();
$data = array(
'updated_on' => '2007-03-23',
'bug_status' => 'FIXED'
);

$where = $table->getAdapter()->quoteInto('bug_id = ?', 1234);
$table->update($data, $where);
Flakron Bytyqi
Thanks for solution.
Alexander.Plutov