首页 > 技术文章 > CakePHP 查询总结

mafeifan 2013-12-20 21:49 原文

返回

$this->Post->buildQuery();

返回:

    Array
    (
        [conditions] =>
        [fields] =>
        [joins] => Array
            (
            )

        [limit] => 1
        [offset] =>
        [order] => Array
            (
                [0] =>
            )

        [page] => 1
        [group] =>
        [callbacks] => 1
    )

当传入参数

$this->Post->buildQuery('all',array('page'=>'5','limit'=>7));

返回:

    Array
    (
        [conditions] =>
        [fields] =>
        [joins] => Array
            (
            )

        [limit] => 7
        [offset] => 28
        [order] => Array
            (
                [0] =>
            )

        [page] => 5
        [group] =>
        [callbacks] => 1
    )

 

推荐阅读