How to add conditions in case:

Tops - hasMany posts
Posts - belongsTo Tops.

When I view Top, I get all related post.

But, I want get Only post where field 'approved' = 1.

This: doesn't work
        var $paginate = array('limit' => 10, 'conditions' => 'Post.approved =
1');

        function index() {
                $this->Top->recursive = 0;
                $this->set('tops', $this->paginate());
        }

What is decision?


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

Reply via email to