Ive been working with symfony since few days, now I am trying to make updates, but I am stuck with many problems, one of them is that I cant find a way to update a field adding a value, instead replacing the value, I just want to add the new one.
$q = Doctrine_Query::create()
->update('OhrmBudget')
->set('spent', 'spend' + $cost)
->where('month', $month)
->where('year', $year);
$q->execute();
I feel like the "wheres" are not working! because I also have another update and it sets the new value to all fields on my table.
$q = Doctrine_Query::create()
->update('OhrmTrainningSubmit')
->set('state', $state)
->where('trainning', $training)
->andWhere('user', $user);
$q->execute();
Any idea how to make this updates? I checked a link with reference I checked, but in none of them make this kind of updates, and none of them use more than one Where that I need, anyone could give me an idea?
I am with symfony 1.4
Thanks