On Jun 10, 3:35 pm, WhyNotSmile <[email protected]> wrote:
> Oh, sorry, yes... $friendsarray gets processed; if it's null then the
> userid is used to find the record which should be deleted.
>
> So it's:
>
> if(!$friendsarray) {
>  $friend = $this->Friend->findByUserId($userid);
>  $this->delete($friend['Friend']['id']);

Actually, why aren't you simply doing $this->delete($userid)? Why do
the extra find? In any case, it should be $this->find(), not $this-
>Friend->find()

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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