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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                查詢表達式支持大部分的SQL查詢語法,也是`ThinkPHP`查詢語言的精髓,查詢表達式的使用格式: ~~~ where('字段名','表達式','查詢條件'); whereOr('字段名','表達式','查詢條件'); ~~~ 表達式不分大小寫,支持的查詢表達式有下面幾種,分別表示的含義是: | 表達式 | 含義 | | --- | --- | | EQ、= | 等于(=) | | NEQ、) | | GT、> | 大于(>) | | EGT、>= | 大于等于(>=) | | LT、< | 小于(<) | | ELT、<= | 小于等于(<=) | | LIKE | 模糊查詢 | | \[NOT\] BETWEEN | (不在)區間查詢 | | \[NOT\] IN | (不在)IN 查詢 | | \[NOT\] NULL | 查詢字段是否(不)是NULL | | \[NOT\] EXISTS | EXISTS查詢 | | EXP | 表達式查詢,支持SQL語法 | | \> time | 時間比較 | | < time | 時間比較 | | between time | 時間比較 | | notbetween time | 時間比較 | 表達式查詢的用法示例如下: ## EQ :等于(=) 例如: ~~~ where('id','eq',100); where('id','=',100); ~~~ 和下面的查詢等效 ~~~ where('id',100); ~~~ 表示的查詢條件就是?`id = 100` ## NEQ: 不等于(<>) 例如: ~~~ where('id','neq',100); where('id','<>',100); ~~~ 表示的查詢條件就是?`id <> 100` ## GT:大于(>) 例如: ~~~ where('id','gt',100); where('id','>',100); ~~~ 表示的查詢條件就是?`id > 100` ## EGT:大于等于(>=) 例如: ~~~ where('id','egt',100); where('id','>=',100); ~~~ 表示的查詢條件就是?`id >= 100` ## LT:小于(<) 例如: ~~~ where('id','lt',100); where('id','<',100); ~~~ 表示的查詢條件就是?`id < 100` ## ELT: 小于等于(<=) 例如: ~~~ where('id','elt',100); where('id','<=',100); ~~~ 表示的查詢條件就是?`id <= 100` ## \[NOT\] LIKE: 同sql的LIKE 例如: ~~~ where('name','like','thinkphp%'); ~~~ 查詢條件就變成?`name like 'thinkphp%'` `V5.0.5+`版本開始,like查詢支持使用數組 ~~~ where('name','like',['%think','php%'],'OR'); ~~~ ## \[NOT\] BETWEEN :同sql的\[not\] between 查詢條件支持字符串或者數組,例如: ~~~ where('id','between','1,8'); ~~~ 和下面的等效: ~~~ where('id','between',[1,8]); ~~~ 查詢條件就變成?`id BETWEEN 1 AND 8` ## \[NOT\] IN: 同sql的\[not\] in 查詢條件支持字符串或者數組,例如: ~~~ where('id','not in','1,5,8'); ~~~ 和下面的等效: ~~~ where('id','not in',[1,5,8]); ~~~ 查詢條件就變成?`id NOT IN (1,5, 8)` > `[NOT] IN`查詢支持使用閉包方式 ## \[NOT\] NULL : 查詢字段是否(不)是`Null`,例如: ~~~ where('name', null); where('title','null'); where('name','not null'); ~~~ 如果你需要查詢一個字段的值為字符串`null`或者`not null`,應該使用: ~~~ where('title','=', 'null'); where('name','=', 'not null'); ~~~ ## EXP:表達式 支持更復雜的查詢情況 例如: ~~~ where('id','in','1,3,8'); ~~~ 可以改成: ~~~ where('id','exp',' IN (1,3,8) '); ~~~ `exp`查詢的條件不會被當成字符串,所以后面的查詢條件可以使用任何SQL支持的語法,包括使用函數和字段名稱
                  <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>

                              哎呀哎呀视频在线观看