Hello, can someone tell me if this is possible? I have the following
Model association:

PhdUser hasOne PhdApplication
PhdApplication hasMany PhdCollege

So a user inputs multiple colleges for their application, and I want
to query for only the most recent college (dateLeft).

I've just started understanding and using the containable behavior and
was trying along these lines:

$query = $this->PhdUser->find('all', array(
                                                                
'contain'=>array(
                                                                
'PhdCollege'=>array('dateLeft = max(dateLeft)'),
                                                                
'PhdApplication'=>array('userID = "6240"'),
                                                                'PhdTest'
                                                                ),

However what I have there for the 'MAX' operator doesn't work. Can
this operator be used in there or can someone indicate a better way
for me to do this?

thanks!
al
--~--~---------~--~----~------------~-------~--~----~
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