I think it would be useful for you to look through the API.

http://api.cakephp.org/model__php5_8php-source.html#l00771

specifically:

00842         if (count($fields)) {
00843             if (!empty($this->id)) {
00844                 if ($db->update($this, $fields, $values)) {
00845                     if (!empty($joined)) {
00846                         $this->__saveMulti($joined, $this->id);
00847                     }
00848
00849                     $this->afterSave();
00850                     $this->data = false;
00851                     $this->_clearCache();
00852                     return true;
00853                 } else {
00854                     return false;
00855                 }
00856             } else {
00857                 if ($db->create($this, $fields, $values)) {
00858                     if (!empty($joined)) {
00859                         $this->__saveMulti($joined, $this->id);
00860                     }
00861
00862                     $this->afterSave();
00863                     $this->data = false;
00864                     $this->_clearCache();
00865                     $this->validationErrors = array();
00866                     return true;
00867                 } else {
00868                     return false;
00869                 }
00870             }
00871         } else {
00872             return false;
00873         }


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to