I have two tables, courses and participants. courses has many participants
courses
courseID [PK]
courseName
participants
ID [PK]
courseID [FK]
staffID
in my course model, I had define the relations as below
public function relations()
{
return array(
'participantsCount' => array(self::STAT, 'participants', 'courseID'),
);
}
May I know how can I use cgridview to list out all courses with the ‘participantsCount’ = 0