<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 功能強大 支持多語言、二開方便! 廣告
                * [ ] 功能 * 用于配合 group 方法完成從分組的結果中篩選(通常是聚合條件)數據 * having方法有兩個參數:$data 和 $andor * $data 是聚合條件,支持數據、字符串 * 當 $data 為數組的時候,$andor 條件組合類型設置才有效,or 或 and,默認 and * 當 $data 為字符串的時候,$andor 設置值無效 * 場景:user 數據庫的 user_account 表只有 3 條數據,數據為: user_account 表 | uid | username | score | | :---: | :---: | :--: | | 1 | 張三 | 100 | | 2 | 李四 | 97 | | 3 | 隔壁老王 | 100 | * 用法一:數組方式 ~~~ // 過濾字段 $field = 'uid,username,count(score) as count_score'; // 數組聚合條件 $having = array( 'count_score[>]' => 99, 'uid[>]' => 1, ); // 按照用戶 ID 分組 $group = 'uid'; // 條件組合關系,默認是 and $andor = 'and'; $data = mysql\User::table('account')->field( $field )->having( $having, $andor )->group( $group )->select(); ~~~ 查詢結果: ~~~ array( array( 'uid' => 3, 'username' => '隔壁老王', 'count_score' => 100, ), ); ~~~ * 用法二:字符方式 ~~~ // 過濾字段 $field = 'uid,username,count(score) as count_score'; // 字符聚合條件 $having = 'count_score > 99 and uid > 1'; // 按照用戶 ID 分組 $group = 'uid'; $data = mysql\User::table('account')->field( $field )->having( $having )->group( $group )->select(); ~~~ 查詢結果: ~~~ array( array( 'uid' => 3, 'username' => '隔壁老王', 'count_score' => 100, ), ); ~~~
                  <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>

                              哎呀哎呀视频在线观看