title: Yii SQL to CActiveDataProvider
body: <p>I need help from Yii experts, I have a SQL query </p>
  
  <pre><code>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=&lt;myid&gt;)
  </code></pre>
  
  <p>I need to convert this to CActiveDataProvider in Yii. something like this </p>
  
  <pre><code>            $dataProvider2=new CActiveDataProvider('Products',array(
                          'criteria' =&gt; array(
                               ...                                      
                          ),
  
                  ));
  </code></pre>
  
  <p>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 ().</p>