For example I have the following tables in my database:
- People
- Groups
And in the People table I have the following columns:
- Name
- Birthdate
- Group
In the Groups table I have the following columns:
- Name
- Colour
Now I want to fetch results from my database to make a list of all the People. So I would use this:
$this->set('people', $this->Person->find("all"));
And obviously in my view I would loop through the returned array and display it. Now I also want to find out for each person in the list what Colour and Group name they are (retrieved from the groups table).
How would I go about this in CakePHP.