But there is very helpful article: http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find
On Nov 5, 1:44 am, Miles J <[email protected]> wrote: > Use the "join" parameter within find. However, theres not really any > documentation on it, so you would have to read the source code > manually. > > On Nov 4, 10:07 am, centr0 <[email protected]> wrote: > > > > > Update: > > > This query is what i typically want run for the comments part of the > > contain: > > > SELECT Comment.content, Comment.created, Comment.modified, > > Photo.thumbnail, User.name > > FROM > > comments AS Comment > > LEFT JOIN > > profiles AS i ON Comment.profile_id = i.id > > LEFT JOIN > > users AS User ON Comment.user_id = User.id > > LEFT JOIN > > photos AS Photo ON User.id = Photo.user_id > > WHERE > > Comment.profile_id =1 > > > anyway to portray this the cake way? id like to stay away from custom > > SQL. 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 -~----------~----~----~----~------~----~------~--~---
