I have the following tables:
sites
- id
- title
site_users
- id
- site_id
- user_id
How do I construct a "find()" to retrieve equivalent of the following
query:
SELECT a.id, a.title FROM sites a, site_users b WHERE a.id = b.site_id
AND b.user_id = 1;
I tried "find('list', array('fields'=>array('SiteUser.site_id',
'SiteUser.Site.title')))" but nothing is that easy ;-)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---