I am trying to simply execute the following Cake save () functions.
UPDATE user SET value = value-1
However, it looks like it can only be installed. He will not understand anything that I pass to him to increase or subtract, and no one from the Internet seems to have this problem .: P Even when you look at the full part of the software created on CakePHP 2.0, I find $ this-> query (), which is used to update in increments! Is it really how I will update if I don't have a value to configure yet?
(the code is as follows)
$data = array('id' => uid, 'value' => "Users.value = Users.value - 1"); $this->User->save($data);
source share