On Thu, May 15, 2008 at 5:12 PM, MarcS <[EMAIL PROTECTED]> wrote:

>
> I'm wondering if there is any way that I can know if I'm updating or
> deleting when I'm inside the beforeSave function


- If $this->id (in model's beforeSave() callback) is false then you are
creating record otherwise it has id of record which will be getting updated

-- 
Amit

http://amitrb.wordpress.com/
http://coppermine-gallery.net/
http://cheesecake-photoblog.org/
http://www.sanisoft.com/blog/author/amitbadkas

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to