php - CakePHP savefield() with out knowing the record's id -


how can update single field without knowing record's id? have user's username , don't want waste resources doing query id.

note: know can achieve updateall() seams on kill, there better way?

can how limit updateall() search 1 record , finish, because don't want continue search when there 1 possible match.

updateall() way go in case.

all other save methods require id known.

you use query() method : $this->model->query($sql)

however, remember values not automatically escaped in method.


Comments

Popular posts from this blog

Python __call__ special method practical example -

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -