Total 4 comments

you can join or add two or more database tables using join operation, that is already mention in this example. see -

$rawData=Yii::app()->db->createCommand("SELECT a.id as ID, a.first_name as FName, a.last_name as LName, a.status as Status, b.country_name as Country FROM user a LEFT JOIN country_list b ON a.country_id = b.id")->queryAll();

As per your query, you need to modify query with adding WHERE clause. Suppose my searching parameters are status and country so will modify my query like this -

using the query I retrieve a grid. now there is no start date in the advance search, because this start date is retrieved from another table.(eg : maturity table) how can i use this start date in the advanced search.