Hi
I have the following code:
public function actionIndex($id)
{
$dataProvider=new CActiveDataProvider('Item', array(
'criteria' => array(
'with' =>'Area',
'condition' => 't.Area_id=:id',
'params' => array(':id'=>$id),
What I need to do is join another table of featured Items and then order the whole thing with by what results are featured?
So far I got to this:
public function actionIndex($id)
{
$dataProvider=new CActiveDataProvider('Item', array(
'criteria' => array(
'with' =>'Area',
'condition' => 't.Area_id=:id',
'params' => array(':id'=>$id),
'with' =>'featuredItems',
But then I just keep inuring errors if I try to order the results. I’m not sure how to use the Item.id to join the featuredItems.item_id as a condition? Or if that column data would even be available during this point in the query