So are you saying you're getting data posted to you somehow that isn't
related to the tables you outlined?

I'm not clear on whet you mean by "I can't control the name of the
fields coming in", but it sounds like you have the basic idea.

Cake should handle the magic for you as long as you build the table
structure, model and relationships properly.

All you need to do is build the Model structure into $this->data, and
do a saveAll (or save for each bit you are interested in). There are
lots of examples on how to do this floating around.

On Dec 23, 8:11 am, "Chad Casselman" <[email protected]> wrote:
> Very new to cakePHP and of course the first thing I try doesn't follow the
> model.
>
> I am trying to create a script which takes a lot of post variables (from
> 1shoppingcart exactly) and then puts them in the corresponding values in my
> database design.
>
> Let's say my database is:
> customers
> customers_products
> products
>
> I haven't figured out exactly how to do the associations but that is not my
> hang up right now.
>
> I can't control the name of the fields coming in, but I need for the
> save/post to go through the data and put the customer info into the customer
> table (always new inserts), then go through the product information (unknown
> count) (product1name, product2name, etc) and put them in the product table
> (record of source) if they do not exist and then connect the customer to the
> products that they ordered.
>
> I am completely stumped on how to even tackle processing form information
> that was not generated by cake.
>
> Chad
--~--~---------~--~----~------------~-------~--~----~
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