当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractModel::getOnComplexQuery方法代码示例

本文整理汇总了PHP中AbstractModel::getOnComplexQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractModel::getOnComplexQuery方法的具体用法?PHP AbstractModel::getOnComplexQuery怎么用?PHP AbstractModel::getOnComplexQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AbstractModel的用法示例。


在下文中一共展示了AbstractModel::getOnComplexQuery方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAllBidbyId

 public static function getAllBidbyId($id)
 {
     $select = new SelectPDO();
     $select->from("bid", ["bid.*", "lot.title", "user.first_name", "user.last_Name"])->where("`bid`.`lot_id` = ?", array($id))->join("lot", "lot_id", "id")->join("user", "user_id", "id");
     $data = AbstractModel::getOnComplexQuery($select);
     return $data;
 }
开发者ID:Kit-kat1,项目名称:Auction_bootstrap,代码行数:7,代码来源:bid.php

示例2: actionMyLots

 /**
  * this function shows us our all lots
  * 
  */
 public function actionMyLots()
 {
     if ($this->request->order == "") {
         $products = MyProduct::getMyProduct($this->user->id);
         if (!$products) {
             $products = [];
         }
         $countLots = $this->user->getQuantityLots();
         $countBids = $this->user->getQuantityBids();
         if ($countLots == "") {
             $countLots = 0;
         }
         if ($countBids == "") {
             $countBids = 0;
         }
         $this->view->lots = $countLots;
         $this->view->countBids = $countBids;
         $this->view->user = $this->name;
         $this->view->products = $products;
         $this->view->render('mylots');
         $this->view->display();
     } else {
         $id = (int) $_POST["order"];
         $fields = ["title", "description", "current_price", "id", "front_img", "created"];
         $where = "user_id = ? ";
         $user_id = $this->user->id;
         $select = new SelectPDO();
         $select->from("lot", $fields)->where($where, array($user_id));
         switch ($id) {
             case '0':
                 $select->order("current_price", false);
                 break;
             case '1':
                 $select->order("current_price", true);
                 break;
             case '2':
                 $select->order("created");
                 break;
             default:
                 $select->order("title");
                 break;
         }
         $data = AbstractModel::getOnComplexQuery($select);
         $data = json_encode($data);
         echo $data;
         exit;
         $products = MyProduct::getMyProduct($this->user->id);
         echo json_encode($products);
     }
 }
开发者ID:Kit-kat1,项目名称:Auction_bootstrap,代码行数:54,代码来源:user.php


注:本文中的AbstractModel::getOnComplexQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。