You define these two relations in your model class.
'study' => array(self::HAS_MANY, 'Entry','study_id'),
'program'=>array(self::BELONGS_TO,'Program',array('program_id'=>'id'),'through'=>'study'),
Now in your view file, you write var_dump($data->program)
It will show list of programs of your specific entry.
You can also get help from my this link.
How to get data from Relations with joins in yii
Hope it will help you.
Thanks