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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ![](https://img.kancloud.cn/dd/bf/ddbfb34b0fa85aa7e8c4d9b9e298caa9_811x386.png) 語法: `use think\Db;` 先引入Db 返回多條或者一條 where(字段名,要查詢的數據) where語句的三種用法 ~~~ $res=Db::name('maik')->where('id',2)->where('user_name','zhangxueyou')->select(); //查詢返回一條或者多條 $res=Db::name('maik')->where('id',2)->whereOr('user_name','zhangxueyou')->select(); //查詢返回一條或者多條 Or是并且的意思 $res=Db::name('maik')->where( $data)->select(); //查詢返回一條或者多條數組方式查詢 ~~~ 代碼案例: ~~~ <?php namespace app\index\controller; use think\Controller; use think\Db; class Index extends Controller { public function index(){ // $res=Db::name('maik')->find(); //查詢一條數據 $data=['id'=>2,'user_name'=>"zhangxueyou"]; $res=Db::name('maik')->where('id',2)->where('user_name','zhangxueyou')->select(); //查詢返回一條或者多條 $res=Db::name('maik')->where('id',2)->whereOr('user_name','zhangxueyou')->select(); //查詢返回一條或者多條 $res=Db::name('maik')->where( $data)->select(); //查詢返回一條或者多條數組方式查詢 dump($res); } } ~~~ ![](https://img.kancloud.cn/67/f0/67f0740c38a4ff7364aff6bc88418498_1267x678.png) SQL語句解析 ![](https://img.kancloud.cn/06/25/0625eee97fa09ca34d05fd36a2aedcaa_1376x286.png) ## 運算條件查詢 查詢maik id大于2的所有數據 也可也 ``` < > != ``` 詳細運算符可以查看官方文檔 http://www.hmoore.net/manual/thinkphp5/135182 ## 語法: ~~~ $date= Db::name('maik')->where('id','>',2)->select(); dump($date); ~~~ ![](https://img.kancloud.cn/24/33/24337d2db98c84e3f95be27f47f15e97_1311x401.png)
                  <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>

                              哎呀哎呀视频在线观看