Hello friends...
how to fetch the data from another table using CdbCriteria and CActiveDataProvider and this data will be display in view part in CListView?
pls help me.
which is appreciated for me..
thanks in advance..
Page 1 of 1
How To Fetch The Data From Another Table Using Cdbcriteria And Cactivedataprovider?
#2
Posted 29 January 2013 - 03:51 AM
Using relation name You can get the another table values ex. in Listview table2.name, table2.value
--------
Bsourcecode
--------
Bsourcecode
#3
Posted 29 January 2013 - 04:10 AM
mbala, on 29 January 2013 - 03:51 AM, said:
Using relation name You can get the another table values ex. in Listview table2.name, table2.value
--------
Bsourcecode
--------
Bsourcecode
thanks mbala...
i am using this link....
Quote
My link
this is done properly after that in the view part another table data not come.
pls give me some suggestion..
#4
Posted 29 January 2013 - 07:50 AM
i solved this problem......
i am using "with" in CActivedataprovider and CDbCriteria in controller..
and in view part i use this..
$data->pricing->price
i am using "with" in CActivedataprovider and CDbCriteria in controller..
$criteria = new CDbCriteria();
$dataProvider = new CActiveDataProvider('ProductIndex', array(
'criteria' => array(
'with' => 'pricing',
'with' => 'masterKey',));
and in view part i use this..
$data->pricing->price
Share this topic:
Page 1 of 1

Help












