Hello,
I am writing a script in CakePHP and so far the experience has been
great. But today I faced a slight problem with those "magic function"
thing.

I am trying to find comments by post_id (which is the foreign key in
the "Comments" table)

$comments = $this->Comment->findByPost_id($item['Post']['id']);
$this->set('comments', $comments);

The problem is that its not returning all the comments with the
specific post_id. It just returns the first one. How do I make this
work?

Here are the alternatives i have tried:
$this->Comment->findByPostId
$this->Comment->findByPost_Id
$this->Comment->findByPost-id
$this->Comment->findByPost_Id

but none of them work.


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

Reply via email to