When you define the model associations, you can add a "conditions" key
to the array. Check the CookBook and you will understand what I mean.
Wait, let me give you an example:

var $hasMany = array('Book' => array('conditions' =>
array('Book.price' => '!= 0')));

Hope this can help you.

Cheers,
mbavio

On May 8, 3:11 pm, jmmg77 <[EMAIL PROTECTED]> wrote:
> My question is simple, but I haven't been able to find the answer.
> I'm using Cakephp1.2 which I'm really liking, but I can't seem to
> figure this one out.
>
> Is there a way to hard code conditions in the model itself.  I'm not
> talking about associations just the model itself.
>
> An example would be if I have a 'people' table.  Can I create a model
> called 'members' that filters all people with a valid memberid?
>
> (there would be no good reason to do this, this is simply an example).
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to