$documentid = $this->Document->getInsertId(); On Thu, May 14, 2009 at 4:15 AM, oly.yates <[email protected]> wrote: > > Ok well the problem defiantly seems to be cake to getting the document > sequence as it all works fine when i do this: > if($this->Document->saveAll($this->data)){ > if(!$this->Document->id){ > $documentid = $this->Document->query("SELECT > documentid_seq.currval FROM dual"); > $documentid = $documentid[0]['documentid_seq'] > ['currval']; > }else { > $documentid = $this->Document->id; > } > $message = '"Save Sucessful"'; > $this->set(compact('message','documentid')); > $this->render('save', 'ajax'); > } > } > > > >
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
