<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>

                where條件需要有明確那張表 ``` $where = array( 'a.store_id' => $storeId, 'a.goods_user\_status' => 1, ); $goodsRes = Db('goods') ->alias('a') ->join('goods_class b','a.class_id = b.class_id','LEFT')//商品分類 ->join('store_class c','a.store_class_id = c.class_id','LEFT')//店鋪分類,在個人店鋪里的 ->field('a.* , b.class_name, c.class_name as store_class_name') ->where($where) ->order('goods_id desc') ->paginate(10); ``` thinkphp實現多表查詢 ``` /** * 顯示資源列表 * * @return \think\Response */ public function index() { //獲取當前店鋪id $uid = session('home_uid'); $storeId = db('store')->where('store_uid',$uid)->field('store_uid')->find(); $storeId = implode(" ",$storeId); $storeId = (int)$storeId; $where = array( 'a.store_id' => $storeId, 'a.goods_user_status' => 1, ); //全部商品 $goodsRes = Db('goods') ->alias('a') ->join('goods_class b','a.class_id = b.class_id','LEFT')//商品分類 ->join('store_class c','a.store_class_id = c.class_id','LEFT')//店鋪分類,在個人店鋪里的 ->field('a.* , b.class_name, c.class_name as store_class_name') ->where($where) ->order('goods_id desc') ->paginate(10); $this->assign([ 'seo_title'=> '店鋪商品-' . config('site.WEB_TITLE'), 'seo_keywords'=> config('site.WEB_KEYWORDS'), 'seo_desc'=> config('site.WEB_DESCRIPTION'), 'goodsRes' => $goodsRes, ]); return $this->fetch('seller_goods/index'); } ```
                  <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>

                              哎呀哎呀视频在线观看