If you do not want to get ID using getLastInsert() then by default
after saving the data to db, you have the reference to the id in your
model.

if ($this->User->save($this->data()))
{
   // If successful, then
   $insertedRowID = $this->User->id; // This will give you the id of
latest inserted id!
}

Correct me if wrong, but seems to do the right thing for me!

Ketan :-)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to