Anupom: thank you very much to redirect me to the saving-your-data
section of the book. It helped me to solve the issue.
Actually, the problem was within the array format:
There is no need to specify the "Model" in the array. i.e. the correct
array format should be:
$this->data = Array(
                              Array('office_id' => '7',
'name' => '666', 'description' => 'aaaa1'),
                              Array('office_id' => '7',
'name' => '222', 'description' => 'bbb1'),
                              Array('office_id' => '7',
'name' => '333', 'description' => 'ccc1')
                             );

Thank you very much...

On Nov 6, 12:42 am, Anupom <[EMAIL PROTECTED]> wrote:
> Try saveAll().http://book.cakephp.org/view/75/Saving-Your-Data
>
>
>
> On Thu, Nov 6, 2008 at 11:32 AM, si-mon <[EMAIL PROTECTED]> wrote:
>
> > Hi...
> > Is it possible to insert multiple records in a single save().
>
> > For example:
> > I need to insert the following array in a single save():
> > $this->data = Array('Model' =>
> >                              Array(
> >                                       Array('office_id' => '7',
> > 'name' => '666', 'description' => 'aaaa1'),
> >                                       Array('office_id' => '7',
> > 'name' => '222', 'description' => 'bbb1'),
> >                                       Array('office_id' => '7',
> > 'name' => '333', 'description' => 'ccc1')
> >                                      )
> >                               );
>
> --
> Anupom Syamhttp://syamantics.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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