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
Post a Comment