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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -