Well, if you want to filter your data *in the view*, you're doing it
wrong. It would be silly to fetch ten thousand records from the
database just to show five of them. I sure hope that's not what you're
trying to do.

Like Richard said, this is the solution to your problems:

$data = $this->ModelName->find
        (
                'all',
                array
                (
                        'contain' => array('RelatedModel'), // use this if you 
use the
Containable behaviour, if not well, "fail"..
                        'conditions'=>array('RelatedModel.field' => $yesValue)
                )
        );

Does that help or did you have something else in mind?

On May 21, 6:42 am, programguru <ja...@w3developing.com> wrote:
> Is it possible to just run it all in the foreach like?
>
> foreach ($task['Status=>YES'] as $task):
> --
> View this message in 
> context:http://www.nabble.com/displaying-records-in-index-through-specific-fi...
> Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to