Hi,
Im a newbie to Cake, so apologies in advance if this is a silly
question.  I am trying to use a simple hasMany model association with
a condition on a date field, so that only "Jobs" created in the last
two weeks are returned.  In my model, I have:

var $hasMany = array(
        'Job' => array(
                'className' => 'Job',
                'foreignKey' => 'recruiter_id',
                'conditions' => array("Job.created >" => date('Y-m-d', 
strtotime("-2
weeks"))),
        )
);

This is based off the manual "Complex Find Conditions" topic.

For some reason, I keep getting the error
"Parse error: syntax error, unexpected '.', expecting ')'" for the
line which defines the conditions...

I can't seem to figure out whats wrong with my syntax. Im using the
latest version of Cake.

Thanks!


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