Good evening. I have this question. When transferring a site from MySQL to SQL Server 2008 pagination stopped working where the relational link was made. Ie example criteria .:

 $criteria=new CDbCriteria; $criteria->together = true; $criteria->with = array('fk_device'); .......... return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); 

And when I remove the link $criteria->with = array('fk_device'); then page navigation works. It would be possible to remove but then search on this link will not work. $criteria->with = array('fk_device');

    1 answer 1

    I answer your question. Maybe someone will help it too. Although this is a perversion as for me, crossing Apache + SQL Server 2008 + PHP. Well, the answer is:

     $criteria=new CDbCriteria; $criteria->together = true; $criteria->with = array('fk_device'); .......... return new CActiveDataProvider($this, array( 'criteria'=>$criteria, 'sort'=>array( 'defaultOrder' => 't.id ASC', ), )); 

    That's all that had to be done. And paginated navigation works as expected))).