Re: Import Script Help Please

2008-12-26 Thread Webweave
If you put the data into the array before you do your save, Cake does the magic under the covers to figure out if the record exists already or not. When you do the save, Cake does a lookup to figure out if the request needs to be an insert or delete (assuming you have the constraints set

Re: Import Script Help Please

2008-12-25 Thread Webweave
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

Re: Import Script Help Please

2008-12-25 Thread Chad Casselman
Let's see if I can explain this better. I have the models setup correctly or so I think - new to all of this. But I am getting lots of information posted from an external source so let's say field1, field2, field3, etc. etc. Fields 1-10 are customer information Fields 11-15 are product

Import Script Help Please

2008-12-23 Thread Chad Casselman
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