On 2/21/07, MaxPower <[EMAIL PROTECTED]> wrote:
> if ($this->params['action'] == 'add') {
> // do the above code
> } else if ($this->params['action'] == 'edit') {
> // check to see if username/email in $this->data is the same as the
> existing records for the given $id
> }
Try checking if the $this->data has id set - a missing id means INSERT
if id is present then CakePHP UPDATEs
HTH
Tarique
--
=============================================================
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog: http://cheesecake-photoblog.org
=============================================================
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---