
I need to select items from table3 with a condition involving table1.
$condition = 'table1.someField = someValue';
$anuncios = new CActiveDataProvider('anuncio', array(
'criteria'=>array(
'condition'=>$condition,
// I am using table 2 also, so:
'with'=>'table2',
'together'=>true,
),
'pagination'=>array(
'pageSize'=>self::PAGE_SIZE,
),
'sort'=>$sort,
));
Of course, this doesn't work, I get an error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'table1.someField' in 'where clause'
Can you help me?
What am I missing here?
Thanks

Help














