Is there a 'Cake' way of including subqueries in join clauses of SQL select statements?
I'm looking to generate something in the form of - SELECT ... FROM table1 JOIN (SELECT DISTINCT key FROM table2 WHERE ...) table2 ON table2.key = table1.key I have been looking at joining tables in the docs, but it only seems to support joining tables rather than expressions. I could move the DISTINCT to the main query, but that does not perform as well, and also messes up pagination. Thanks Mark -- 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]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
