<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ##### 多字段匹配同一個值 ``` whereRaw("concat(title,description,content) like '%".$keyword."%'"); ``` ##### 指定字段 分頁 ``` ->orderBy('id','desc') ->limit($page_size) ->offset(($page-1)*$page_size) ->select(['id','title','thumb','description','free','tags','defined_tag','aim_type','time_type']) ``` ##### 被關聯模型 條件篩選 ``` $data=Channel::with(['channelidentify'=>function($query)use($arr){ return$query->whereIn('identifyId',$arr); }])->where($where)->select('channelName','channelId')->get()->toArray(); ``` ##### 被關聯模型 查詢指定字段 ~~~ with('channelidentify:identifyId,code,channelId')->where($where)->select('channelName','channelId') ~~~ ##### 表關聯查詢 ~~~ $field = ['r.name as role_name','r.id as role_id']; return DB::table("ad_manage_role","m") ->join("ad_role as r","m.role_id","=","r.id") ->where("m.manage_id",$manage_id)->select($field)->get(); ~~~ ##### distinc ~~~ DB::table("product_uv","pu")->where($date_where)->distinct()->count('pu.user_id'); ~~~ 注意 distinct() 去重某個字段數據時 需要的where條件 或者 count中指定出來 #### 計算多行數據的和sum ~~~ $field = 'sum(pay_num) as pay_num_total,sum(fail_order) as fail_order_total,sum(success_pay) as success_pay_total'; $data = ChannelRecord::query()->select(DB::raw($field))->first(); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看