I need help from Yii experts, I have a SQL query
SELECT p.name , p.price FROM products as p, prod_cat as pc WHERE pc.id_pr = p.id_pr AND pc.id_cat in (SELECT id_cat FROM prod_cat where id_pr=<myid>)
I need to convert this to CActiveDataProvider in Yii. something like this
$dataProvider2=new CActiveDataProvider('Products',array(
'criteria' => array(
...
),
));
I have 3 Tables : Products, Categories and Prod_cat (connection between two others). I need to find others products from the same category of item that i provide ().