Wednesday, September 5, 2012

Upload a flat file into related tables

So I built my first CakePHP app. It's mostly Bake generated with very
little customization. Now my client wants to upload records into the
database. I have the file upload part working and am loading the file
into an array. The issue is that uploaded file is flat (each row has
both the parent and the child). The parent and/or child data may or
may not be new records. Also, my client wants to be prompted to
overwrite old records as a cheesy way to "edit".

I'm looking for advice on how to approach this. Should I use the
upload Controller and View I've already built and make a upload Model?
Or should I add methods to my existing Models and somehow use them
from the upload Controller?

And how do I do the prompting to overwrite existing records?

Thanks,
Tim

--
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.

No comments: