What's the way of building "UPDATE table SET date = NOW() WHERE id = 1" query ?
$table->update(array('date' => 'NOW()'), 'id = 1');
Above code doesn't work properly.
What's the way of building "UPDATE table SET date = NOW() WHERE id = 1" query ?
$table->update(array('date' => 'NOW()'), 'id = 1');
Above code doesn't work properly.
$table->update(array('date' => new Zend_Db_Expr('NOW()'), 'id = 1');
See:
http://framework.zend.com/apidoc/core/Zend_Db/Expr/Zend_Db_Expr.html
Did you try using PHP's date function:
$table->update(array('date' => date('Y-m-d H:i:s')), 'id = 1');