How to display the information in third table?
table one:
tbl_student
id
teacher_id (Foreign Key, Points to id in tbl_teacher, with relation "studentTeacher")
table two:
tbl_teacher
id
clothe_id (Foreign Key, Points to id in tbl_clothe)
table three:
tbl_clothe
id
brand
All the following code are in student table context.
<?php
$this->widget('zii.widgets.CDetailView', array(
'data' => $model,
'attributes' => array(
"studentTeacher.clothe_id", --- It's OK
array(
'label' => 'Clothe Brand',
'type' => 'raw',
'value'=>, --- need some code here
),
),
)); ?>
How to get the "brand" in tbl_clothe in Student context?
Thanks.