Tuesday, July 28, 2009

Re: How do you insert an array into the database?

$data = array('columnName' => 'value');

$this->Model->save($data);

On Jul 28, 1:06 pm, RobS <winzi...@gmail.com> wrote:
> Ok so here's the scoop: I'm using a form to upload to a temp file that
> gets parsed into an array. The array matches field for field the
> database table it's going into.
>
> How do I save to the database with this new array? I've tried all
> sorts of $this->ControllerName->save() permutations and am coming up
> dry. Any ideas?
>
> Thanks,
> Rob
--~--~---------~--~----~------------~-------~--~----~
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: