On Fri, May 2, 2008 at 3:28 PM, LucyFur3d <[EMAIL PROTECTED]> wrote:
>  function edit($id = null) {
>                 $this->Employee->id = $id;
>                 if (empty($this->data)) {
>                         $this->data = $this->Employee->read();
>                 } else {
>                         if ($this->Employee->save($this->data['Employee'])) {
>                                 $this->flash('The employee has been 
> updated.','/employees');
>                         }
>                 }
>         }
>

In your else clause, try adding this:

$this->data['Employee']['id'] = $id

Before you save it.

Hope that helps.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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