Re: insert id after save?
either perform $this->Comment->save($this->data) and then refernece $this->Comment->id -OR- if you have your associations setup in the models you can have $this->data['Comment'] and $this->data['Comment_Association'] all saved via $this->Comment->save($this->data) (that second method probalby isn't what your'e trying to do here with the comments, but just letting you know that you can save multiple data models at once) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: insert id after save?
http://api.cakephp.org/class_model.html#65b843d323334bdf94b909dca29a6531 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
insert id after save?
If I'm saving a record as such: $this->Comment->save($this->params['data']) How do I get the id of the inserted/updated record so I can update associations/execute some custom sql? Thanks! Nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---