i am newbie in Cakephp so I feel difficulties to implement the database queries .. what i want is I want to update a mobile Number where email is equal to the one the user has given .. this is the query which i want to implement
"Update Users set mobileNo = $mobileNo where email = $email"
I am doing this
$mobileNo = $data['mobileNo'];
$email = $data['$email'];
$count = $this->User->find('count', array(
'conditions' => array('User.email' => $email)));
if($count>0){
$email = $this->User->field(
'email',
array('User.mobileNo' => $mobileNo));
echo $email;
$this->User->saveField("mobileNo",$mobileNo);