On Wed, Jan 7, 2009 at 6:05 PM, gearvOsh <[email protected]> wrote:
>
> Can you paste the query you get with this, would be easier to help:
>
> return $this->find ('list', array(
>    'fields' => array ('Alert.message'),
>    'conditions' => array(
>        'Alert.alert_subject_id' => strtoupper ($subject),
>        'AND' => array(
>            'OR' => array(
>                'Alert.start_date'     => null,
>                'Alert.start_date <= ' => date ( 'Y-m-d H:i:s' )
>            ),
>                'OR' => array(
>                        'Alert.end_date'       => null,
>                        'Alert.end_date >= '   => date ( 'Y-m-d H:i:s' )
>                )
>        )
>    )
> ));

Sorry, gearvOsh.  I don't remember it precisely , but as I recally,
rather than the AND of two ORs: (a or b) AND (c or d), it returned the
OR of two ANDs: (a and b) OR (c and d). I did get it working as shown,
though, if that helps any. If you're curious for academic reasons,
i'll be happy to throw the query in and post the results for you.

Thanks again for your time.

-- 
Rob Wilkerson
http://robwilkerson.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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