$conditions = array(
    array('or' => array('field1' => null, 'field1' => 0)),
    array('or' => array('field2' => null, 'field2' => 0))
)

On Mar 21, 8:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> What I'm currently using:
> $this->set('data', $this->Doc->findAll(array("or" =>
> array('Doc.deleted' => 0, 'Doc.deleted' => null),
>                                                                               
>                           "and" => array("or" => array('Doc.is_allowed' => 0,
> 'Doc.is_allowed' => null))
>                                                                               
>                                   ),
>                                                                               
>                           null, 'Doc.name'
>                                                                               
>                           ));
>
> On Mar 21, 12:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi all,
> > I'm having a bit of trouble constructing the conditions for the
> > findAll. I need to check if (Field1 is null or 0) AND (Field2 is null
> > or 0), but every combination I try doesn't include some of the
> > conditions in the query.
>
> > Any ideas?


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