You will have to set $this->UserProfile->id before saving so cake knows
you're willing to update:


>
> <! Userprofile  Table code starts-------------->
>
>              $good=$this->UserProfile->findByUserId($this-
> >data['User']['id']);
>                $note = $this->UserProfile->find($good['UserProfile']
> ['id']);
>
> I get the id of the userprofile table and did the same process what i
> did for the users table, but it will insert a data in a new row.it

wont update my data.
>

Now before saving set:
               if($note > 0){
*               $this->UserProfile->id = $good['UserProfile']['id'];*

>                $this->UserProfile->save($this->data);
>    $this->Session->setFlash($good['UserProfile']['id']);
>    $this->redirect('/users/account_settings');
>                }else{
>                $this->Session->setFlash('Please check');
>    $this->redirect('/users/account_settings');
>                }
>
>        <! Userprofile  Table code ends----------------->
>

Hope that works, good luck!
-- 
Matias Lespiau
http://www.gignus.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to