I have written this: function afterSave($created) { if($created == true) { $forum_id = $this->Topic->field('forum_id', array('Topic.id' => $this->data['Post']['topic_id'])); $forum_posts = $this->Topic->Forum->field('post_count', array ('Forum.id' => $forum_id)); $this->Topic->Forum->saveField('post_count', $forum_posts + 1); } }
And it works fine, but... is it the best 'Cake' way of doing this? TIA t. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---