Wednesday, November 5, 2008

Re: Multiple records in a single save()

Try saveAll().
http://book.cakephp.org/view/75/Saving-Your-Data

On Thu, Nov 6, 2008 at 11:32 AM, si-mon <sijumonap@gmail.com> 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 Syam
http://syamantics.com/

--~--~---------~--~----~------------~-------~--~----~
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 cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: