php - Convert SQL query to Yii Criteria Query -


select a.*, c.category_name products join product_categories b on a.id = b.product_id join categories c on b.category_id = c.id a.store_id = 20

you can try this:

$data = yii::app()->db->createcommand('your query here')->queryall(); var_dump($data); 

Comments