$criteria = new CDbCriteria;
$criteria->select = 't.*,b.*,c.*';
$criteria->join = "INNER JOIN tbl_patient_chair b ON b.patient = '0005'
INNER JOIN tbl_chair c ON b.chair = c.Serial_No";
$criteria->condition = "t.client_id = '0005'";
$model = Patient::model()->findAll($criteria);
'model' => $model
Then in my view I am trying to retrieve all the selected data by doing:
foreach ($model as $models)
But in the result I can see that there is no data from second and third table. The data of the first table is successfully retrieved however I cannot display the other table’s data. The database is MyISAM with no foreign keys defined.