This is driving me crazy, I'm sure it has to be something I am doing incorrectly but I cannot imagine what.
I wonder if their is a limit to the fixed fields or something? Thanks On Feb 14, 4:03 pm, elogic <asymo...@elogicmedia.com.au> wrote: > Thanks but that isn't the issue as I even tried putting it in manually > i.e. $fixed = array('Property' => array('estate_id' => $estate_id, > 'staff_id' => $staff_id, 'upload_id' => 3)); > > It's quite strange, I even renamed the field in the DB and in the > fixed array but nothing is working. > > On Feb 14, 2:40 pm, Graham Weldon <predomin...@gmail.com> wrote: > > > > > > > > > Hey, > > > Where is this code being run? beforeSave, afterSave, somewhere in the > > controller? > > If you haven't performed the save yet, then getInsertID won't work. > > > Cheers, > > Graham Weldonhttp://grahamweldon.com > > e. gra...@grahamweldon.com > > p. (+61) 0407 017 293 > > Skype: grahamweldon > > > On Tuesday, 14 February 2012 at 3:26 PM, elogic wrote: > > > Hi All, > > > > I am using cakeDC utils csvImport to import an uploaded CSV into a > > > table. Everything is working besides one of the fixed fields. I have 3 > > > fixed fields, 2 work as required but the other is skipped everytime. I > > > cannot work out what is happening or why this is the case. It's not > > > making sense to me. > > > > basic code is as follows: > > > > // FIXED FIELDS > > > $estate_id = $this->data['Upload']['estate_id']; > > > $staff_id = $this->data['Upload']['staff_id']; > > > $upload_id = $this->Upload->getInsertID(); > > > > // ARRAY OF ABOVE FIXED FIELDS (Note When I print_r this all works) > > > $fixed = array('Property' => array('estate_id' => $estate_id, > > > 'staff_id' => $staff_id, 'upload_id' => $upload_id)); > > > > // IMPORTING THE CSV WITH FIXED FIELDS > > > $this->Upload->Property->importCSV($_SERVER["DOCUMENT_ROOT"] . '/app/ > > > webroot/files/csvcontacts/'. $thefilename, $fixed); > > > > The estate_id and staff_id both work, the upload_id is coming though > > > NULL each time. > > > > Very strange to me. > > > > Thanks > > > > -- > > > Our newest site for the community: CakePHP Video > > > Tutorialshttp://tv.cakephp.org > > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp > > > others with their CakePHP related questions. > > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php