He’s working in the group controller isn’t he? So if he’s specified a one-to-many relationship, he should just be able to iterate through that relationship.
Building on the relations example above… once you have relations setup you can do something like this:
$group = Group::model()->find(); //get one record using one of the find() methods
echo $group->member->id
$groups = Group::model()->findAll(): //get all groups matching criteria you pass to findAll()
foreach $groups as $group
foreach $group->member AS $member
echo $member->id
I took a look at your code. Why have memberId in the group table? Wouldn’t you rather have groupId in the member table?
If you have a situation where one group HAS MANY members your tables should look like this: