Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 分页不排序描述_Php_Cakephp_Pagination_Cakephp 2.5 - Fatal编程技术网

Php 分页不排序描述

Php 分页不排序描述,php,cakephp,pagination,cakephp-2.5,Php,Cakephp,Pagination,Cakephp 2.5,我无法显示协议编号小于7的协议,也无法按协议编号说明进行订购 我读过了,找不到我的代码哪里错了。它显示的值仅小于7,但始终为ASC。我在这里发现了类似的问题,[有效],(),不知道为什么。协议。协议编号为int(4) $this->Agreement->recursive=0; $agreements=$this->Paginator->paginate('Agreement',数组)( “Agreement.Agreement\u number…您在哪里读到正确的语法 该函数的第三个参数用于排

我无法显示协议编号小于7的协议,也无法按协议编号说明进行订购

我读过了,找不到我的代码哪里错了。它显示的值仅小于7,但始终为ASC。我在这里发现了类似的问题,[有效],(),不知道为什么。协议。协议编号为int(4)

$this->Agreement->recursive=0;
$agreements=$this->Paginator->paginate('Agreement',数组)(

“Agreement.Agreement\u number…您在哪里读到正确的语法

该函数的第三个参数用于排序(我的意思是,在表中…带有向下和向上箭头)

允许排序的字段列表。这允许您防止 在非索引列或不需要的列上排序

您有用于API文档的确切链接,但似乎没有遵循它(如、和)

$this->Paginator->settings=array(
“协议”=>数组(
'order'=>array('Agreement.Agreement\u number'=>'desc')
)
);
$agreements=$this->Paginator->paginate('Agreement',数组)(

“协议。协议号码谢谢你@Nunser帮我的忙!
        $this->Agreement->recursive = 0;
        $agreements = $this->Paginator->paginate('Agreement', array(
            'Agreement.agreement_number <' => '7'
                ), array(
                'Agreement.agreement_number' => 'desc'
            )
        );
        $this->set('agreements', $agreements);
    }
$this->Paginator->settings = array(
    'Agreement' => array(
        'order' => array('Agreement.agreement_number' => 'desc')
    )
);

$agreements = $this->Paginator->paginate('Agreement', array(
        'Agreement.agreement_number <' => '7'));