Hi,
Referring to this guide, I tried the following:
$users = new CActiveDataProvider('User', array(
'criteria' => array(
'condition' => 't.status = ' . User::STATUS_ACTIVE . " AND profile.company <> ''",
'with' => array('profile', 'profile.country', 'videos' => array('select'=>false, 'joinType'=>'INNER JOIN')),
'order' => 't.create_at DESC',
),
));
but it doesn’t work, it displays all users even if the user doesn’t have any videos. What I want is to display only users who have some videos. Is there something that I missed here?
Thanks.