I have a query like this:
SELECT jo . * , pc.checklist_id FROM
job_order_candidates
jo, pdpa_checklist pc WHERE jo.job_id = '5755' AND jo.shortlisted = '1' AND pc.job_id = '5755'
I need to write it in Yii format, how to do it? At the moment I have this code:
$dataProviderSL=new CActiveDataProvider('JobApplication', array(
'criteria'=>array(
'condition'=>'shortlisted='.JobApplication::SL_Y.' AND job_id='.$jobOrder->job_id,
'order'=>'applied_date DESC',
'with'=>array('candidate'),
),
'pagination'=>array(
'pageSize'=>20,
),
));
It's only select single table, I need to select 2 tables. Can anyone help me? Thanks alot.