This question already has an answer here:
I have the following query...and want to add few joint additional joint statements in the existing query...posting plane sql query so that it give u idea what I am actually looking for .
/* simple sql query */
SELECT *
FROM job_profile
INNER JOIN user ON user.id = job_profile.user_id
INNER JOIN category ON category.id = job_profile.category_id
WHERE category_id =1
AND experience =2
AND key_skills LIKE '%php%'
LIMIT 0 , 30
/* simple sql query */
I have tried the follwing in yii.And its working fine till now...but I dont know how to add joint statement.
$results = SearchEmployee::model()->findAll("category_id=:category AND key_skills like :skill AND experience=:experience", array(
'category'=>$category,
'skill'=>'%'.$skills.'%',
'experience'=>$experience
));
I just want to keep the above statement and just need to add above mentioned joint query in the statement.And I dont want to use adbCriteria for time beign.
</div>