> Current Code::
>                 return $this->find(
>                         'all',
>                         array(
>                                 'conditions'=>array(
>                                         'DATE(Post.date)' => '>= '.$date,
>                                         'DATE(Post.date) '=> '<= '.$end_date
>                                 )
>                         )
>                 );
>
> Debug SQL Output::
> WHERE DATE(`Post`.`date`) = '<= 2008-12-31 23:59:59'
>
> Expected SQL Output::
> WHERE DATE(`Post`.`date`) >= '2008-01-01 00:00:00' AND
> DATE(`Post`.`date`) <= '2008-12-31 23:59:59'
>
> What am I doing wrong that is causing this to fail?
>

since you are using the same key twice it is being overwritten. you
need to use array('AND' => array(....
--~--~---------~--~----~------------~-------~--~----~
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