Maybe I'm just not following your logic correctly, but why are you
calling save in your if statement before you process the information
that you're storing in $time_data for the second save?



On Jul 12, 2:21 pm, clarkvr <[EMAIL PROTECTED]> wrote:
> Hello everybody!!
>
> I've an controler that save all my data, but adds an extra value on my
> table field. My controller code that make this is:
>
> if($this->Sign->save($this->data)) {
>
>                                 $data = $this->params['data'];
>                                 $num = count($data['Time']);
>
>                                         foreach($data['Time'] as $field => 
> $value) {
>                                         $time_data = array('Sign' => array(
>                                                                 'id' => 
> $field,
>                                 'time' => $data['Time'][$field],
>                                 'file_id' => $data['File'][$field],
>                                 'movie_id' => $data['Sign']
> ['movie_id'],
>                                 'movie_file_id' => $data['Sign']
> ['movie_file_id'],
>                                 'movie_presentation_id' =>
> $data['Sign']['movie_presentation_id']));
>                                         $this->Sign->create();
>                                         $this->Sign->save($time_data,true);
>                                         }
>                                 $this->Session->setFlash('O slide foi salvo');
>                                 $this->redirect('/');
>
> Can you help me ? Thanks, Alexandre.


--~--~---------~--~----~------------~-------~--~----~
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