如何通过cakephp中的问题修复分页顺序。我的代码在这里..
$testarray = array(010,011,012,013,014,015,001,002,003,004,005,006,007,008,009);
$this->paginate = array(
'conditions' => $testarray,
'fields' => array('Test.id'),
'limit' => 10,
'page' => 1
);
$testpaginate = $this->paginate('Test');
我希望输出类似于$ testarray,但我得到以下内容:
array(001,002,003,004,005,006,007,008,009,010)
我怎样才能达到理想的效果?
答案 0 :(得分:0)
试一试:
$this->paginate = array(
'conditions' => $testarray,
'fields' => array('Test.id'),
'limit' => 10,
'page' => 1,
'order' => '',
);
您可能不得不求助于CakePHP内置方法之外的选项。