Excellent!

Or (to cut this down to only a WHERE clause that I can feed to
findAll() ):

SELECT * FROM `posts` WHERE `revision` in (SELECT MAX(`revision`) FROM
`posts` AS `p2` WHERE `p2`.`post_id` = `posts`.`post_id` GROUP BY
`post_id`);

Very cool; I didn't realize you could that sort of embedded query that
interacts with it's parent query. Thanks very much, Mariano!


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