what about the HABTM associations., is there an easy method to filter
information based on values in the join table?

e.g. User and Group models using groups_users

function index()
   {
       $conditions = array('Group.id' => 2);
       $this->data = $this->User->findAll($conditions);
   }

On 19/08/06, Samuel DeVore <[EMAIL PROTECTED]> wrote:
> array('Post.category_id'=>$id,'Post.author'=>'me')
>
> you can also have >, < and stuff like that just put it like
> 'Post.category_id'=>'< ' + $id
>
> for a strange one.
>
> really you want to avoid the custom sql (using ->query) as much as possible
> IMHO  read the manual section on model for more information
> http://manual.cakephp.org/chapter/models
>
> your conditions can be an array or a string (I tend to prefer the array
> notation)
>
> sam D
>
>
>
>
>  On 8/18/06, c_doug <[EMAIL PROTECTED]> wrote:
> >
> > Thanks, I'll try that as soon as I get a chance. Can you please tell me
> > how (or if it is possible) to have multiple conditions in the array?
> > Similar to: WHERE category_id = 1 AND author = 'me'.
> >
> > Also at what point of complexity or when is it just better to use SQL
> > in your model?
> >
> >
> >
> > > >
> >
>

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