Question: I have a cakePHP problem - I want to make a update query like this

`UPDATE table SET field = field + some_var` 

and I don't know how to do it...

Can anyone help me?

Answer: 
There are two ways to do an update:

If you are only updating one field you can do:

```
$this->Model->id = foo;
$this->Model->saveField('field_name', 'field_value');

```

or, you can do an update using $this->Model->save():

```
$data = array(
    'Model'=>array(
        'id'=>foo,
        'field_name'=>'field_value',
        'another_field_name'=>'another_field_value'
    )
);

$this->Model->save($data);

```

You want to avoid using $this->Model->query() and use CakePHP's built in methods because the build in methods are datasource agnostic (they work the same on MySQL, Oracle, MSSQL etc.)
Use

```
$this->Baker->updateAll(
    array('Baker.approved' => 'Baker.approved + ' . $some_var),
    array('Baker.id' => $someId)
);

```

For more information see: <http://book.cakephp.org/2.0/en/models/saving-your-data.html>