zoukankan      html  css  js  c++  java
  • cake 分页一个典型的条件

            $this->paginate = array(
                'limit' => $limit,
                'order' => array('MerchantProductOrder.id' => 'desc'),
                'fields' => array(
                    'MerchantProductOrder.*',
                    'MerchantProduct.*',
                    'Merchant.*'
                ),
                'joins' => array(
                    array(
                        'table' => 'media_app_order',
                        'alias' => 'MediaAppOrder',
                        'type' => 'inner',
                        'conditions' => array(
                            'MediaAppOrder.merchant_product_order_id = MerchantProductOrder.id',
                        )
                    ),
                    array(
                        'table' => 'merchant_products',
                        'alias' => 'MerchantProduct',
                        'type' => 'inner',
                        'conditions' => array(
                            'MerchantProduct.id = MerchantProductOrder.product_id',
                        )
                    ),
                    array(
                        'table' => 'merchants',
                        'alias' => 'Merchant',
                        'type' => 'inner',
                        'conditions' => array(
                            'Merchant.id = MerchantProduct.merchant_id',
                        )
                    ),
                ),
                'conditions' => $conditions,
            );

    包括了,字段,连接,排序,限制,条件

  • 相关阅读:
    vSphere存储
    NFS服务器搭建
    windows下部署 ISCSI存储
    使用命令修改ip地址
    磁盘操作
    OpenFiler安装与基本配置
    OSPF系列
    NAT
    VLAN系列
    Linux下DNS服务器的基本搭建
  • 原文地址:https://www.cnblogs.com/linksgo2011/p/3011697.html
Copyright © 2011-2022 走看看