Hi,

I'm pretty new to cakephp, so the answer is probably pretty obvious,
but I'm struggling on this for too long now...

One of my models (say 'Course') has a date field, and in the index()
method where I would like to pass only those records which have a date
> 'now'.

However I have no idea how to define such a constraint. From what I
found by googling around, I assembled the following, but it does not
work (no records selected):

        function index() {
                $constraint['Course.date'] = ' > '. date('Y-m-d H:i') ';
                $this->set('courses', $this->Course->findAll($constraint));
                }

I'm using 1.1.13.4450

Any hints are appreciated,
jeroen


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