I am having a problem with using the Conditions parameter in the
Model::Find object. I am reading a book Beginning CakePHP: From Novice
to Professional (ISBN 9871430209775) and there is a Blog application
similar to the one in the Cake Tutorials. The code seems to be written
correctly according to the instructions in the book.

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?

Thanks in advance!

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