Hi
I need to know how to call relationship in listData() ,
For Example in normal way we can call it like :
in my code i just print value as number but I need to print string value from courses table .
Can I call it like?
How To fix that ?
thanks in advance
I need to know how to call relationship in listData() ,
For Example in normal way we can call it like :
$model->section->section_name ;
in my code i just print value as number but I need to print string value from courses table .
public function coursesList($section_id) { $data=Msection::model()->findAll('section_id=:section_id', array(':section_id'=>(int)$section_id)); return CHtml::listData($data,'course_id','course_id'); //// can i call it like : ///listData($data,'course_id->course->course_name','course_id'); }
Can I call it like?
listData($data,'course_id->course->course_name','course_id');
How To fix that ?
thanks in advance