I have an it_system view showing a technical_component subform that works well
but now I would like a to show the RELEASE1 variable, think my sql is correct, the only problem i have is a problem of quotes and double quotes, I don’t know how to do with them in this case (it does not work but not so far, here , the proble of quotes is for the variable $model->IT_SYSTEM_ID tried 1000000 solutions but no results…
Yes you have a big problem, no only for quotes: please read a little bit more on yii and its data providers. Use the framework !
i suppose you have:
class Release1 extends CActiveRecord() {
public $IT_SYSTEM_ID;
public $TECHNICAL_COMPONENT_;
// create a data provider for your grid or list or anything you want
//
public function getDataProvider($Filter_by_IT_SYSTEM_ID, $Filtered_by_TECHNICAL_COMPONENT_) {
$where = "IT_SYSTEM_ID = '".$Filter_by_IT_SYSTEM_ID."' and TECHNICAL_COMPONENT_='".$Filtered_by_TECHNICAL_COMPONENT_."'";
return new CActiveDataProvider(self::model(), array(
'criteria'=>array(
'condition'=>$where,
),
'pagination'=>array(
'pageSize'=>20,
),
));
}
}
I want to show the release1 and the result of the technical_component this exemple is set to show just release1 table results , thing i have already done
Please do you have a solution for the quotes problems? i have to do the request in the grid view because i need the variable $data.
Sorry, but i think resolving "your quotes" is a extremally bad way to dothat and is a contribution to make things in the wrong way bypassing the framework…the way i present for you is using the YII WAY…using the framework. You must extend this example to feet your needs If you look deeply in your code: you are by passing the CActiveRecord model.
As @softark said, resolve your issue by using the provided example (post #4), but learn more in yii and you’ll discover the benefits of Yii.