Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

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 yiiHow to get data from Relations with joins in yii

Hope it will help you.

Thanks

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

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

deleted 62 characters in body
Source Link

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

If you do not get your desired result.

Inform me again.

Hope it will help you.

Thanks

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

If you do not get your desired result.

Inform me again.

Hope it will help you.

Thanks

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

Source Link

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

If you do not get your desired result.

Inform me again.

Hope it will help you.

Thanks