I would suggest using a sql view for the subquery you have there, and map it as a normal table with a model on cakephp. The right join can be set up as a normal association with the key 'type' => 'right' in the association settings. I hope you can read the book about generating OR, and comparing dates, that is the easiest part
-- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
