What if I made the insert 20 days ago, how could I get the last id? I want to get the current ID value in the beforeSave function to apend it to a file I'm saving... Any thouhts?
kevando On Oct 25, 11:17 pm, "Larry E. Masters" <[email protected]> wrote: > $this->Model->save(); > $id = $this->Model->id; > > -- > Larry E. Masters > > > > > > > > On Mon, Oct 25, 2010 at 11:14 PM, cricket <[email protected]> wrote: > > On Mon, Oct 25, 2010 at 11:51 PM, Robert J. Maiolo <[email protected]> > > wrote: > > > > after your save statement.. > > > > $var = $this->Contact->lastInsertId(); > > > It's getInsertID(). You're probably thinking of getLastInsertID(), > > which has been deprecated. > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > 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]<cake-php%[email protected] > > om>For more options, visit this group at > >http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
