Strange behaviour

I have a problem with CDbCriteria,

I set limit to 10 records ($criteria->limit=10) but it seems not to work, I get 5 records in page 1, page 2 blank, 5 records in page 3.

Do You have any idea?

public function actionadmin()

{

$criteria = new CDbCriteria;

$pages = new CPagination(CONTACT::model()->count($criteria));

$pages->pageSize = 10;

$pages->applyLimit($criteria);

$sort=new CSort(‘CONTACT’);

$sort->applyOrder($criteria);

$models = CONTACT::model()->findAll($criteria);

Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.’/js/jquery.tools.js’);

Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.’/js/jquery-impromptu.js’);

Yii::app()->clientScript->registerScript(‘tabs’,

'$(“ul.tabs”).tabs(“div.panes > div.pane”, function(i) {

var pane = this.getPanes().eq(i);

if (pane.is(":empty")) {

pane.load(this.getTabs().eq(i).attr("href"));

}

});’, 4);

$this->render(‘admin’, array(‘pages’ => $pages, ‘models’=>$models, ‘sort’=>$sort));

}

Hi,

do you have the same problem without using your JS tabs?

Same problem without tab. have any idea?