Hi,
I can’t solve the following problem :
I’m using Cgridview to display a list of articles.
I’ve set the pageSize to 10 per page
It’s working fine, but if I join this table with another, the first page only displays 5 items, and the other ones are displaying 10/page
Does anyone have the solution for this ?
Thank you !!
Here’s my code :
$criteria=new CDbCriteria(array(
‘condition’=>‘is_deleted=0 AND is_valid=1’.$recherche,
‘select’=>‘t.*’
));
$criteria->together = TRUE;
// if i add this line, then i got the pagination problem :
$criteria->with = array(
‘images’=>array(‘joinType’=>‘INNER JOIN’, ‘on’=>‘images.annonce_id = t.id’),
);
$dataProvider=new CActiveDataProvider(‘Annonce’, array(
‘pagination’=>array(
‘pageSize’=>10,
),
‘criteria’=>$criteria,
));