<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國際加速解決方案。 廣告
                ~~~ use model\Table; public function db() { // 最簡單的查詢,查詢全表,默認主鍵降序 Table::find(); // 根據主鍵查詢 Table::find(1); // 自定義查詢條件 Table::find([ 'name' => 'test', // 年齡大于20歲 'age > ' => 20 ]); // 自定義查詢字段 Table::find([ 'name' => 'test' ], [ 'field' => 'id, name, age' ]); // 自定義的查詢字段也支持數組格式,這樣更加方便的使用子查詢作為字段 Table::first([ 'name' => 'test' ], [ 'field' => [ 'id', 'name', 'age', '(SELECT COUNT(id) FROM people) people' ] ]); // 自定義排序規則 Table::find([ 'name' => 'test' ], [ 'order' => 'age DESC, sex ASC' ]); // 排序規則也支持數組格式 Table::find([ 'name' => 'test' ], [ 'order' => [ 'age' => 'DESC', 'sex' => 'ASC' ] ]); // 自定義查詢條數 Table::find([ 'name' => 'test' ], [ 'limit' => 5 ]); // 沒有條件查詢 Table::find(FALSE, [ 'field' => 'id, name, age', 'order' => 'age DESC', 'limit' => 5 ]); // 查詢符合條件的第一條數據 Table::first([ 'name' => 'test' ]); // 指定查詢字段 Table::first([ 'name' => 'test' ], 'id, name'); // 查詢符合條件的最后一條數據 Table::last([ 'name' => 'test' ]); // 指定查詢字段 Table::last([ 'name' => 'test' ], 'id, name'); // first、last的查詢字段也支持數組格式,這樣更加方便的使用子查詢作為字段 Table::first([ 'name' => 'test' ], [ 'id', 'name', 'age', '(SELECT COUNT(id) FROM people) people' ]); // 統計全表數據總數 Table::count(); // 統計符合條件的記錄總數 Table::count([ 'name' => 'test' ]); // 計算年齡總和 Table::sum(FALSE, 'age'); // 包含條件計算年齡總和 Table::sum([ 'name' => 'test' ], 'age'); // 獲取年齡最大的值 Table::max(FALSE, 'age'); // 根據條件獲取年齡最大的值 Table::max([ 'name' => 'test' ], 'age'); // 獲取年齡最小的值 Table::min(FALSE, 'age'); // 根據條件獲取年齡最小的值 Table::min([ 'name' => 'test' ], 'age'); // 根據主鍵刪除數據 Table::destory(1); // 如果傳入的ID是數組格式,則會使用IN查詢刪除主鍵 Table::destory([1,2,3]); // 寫入數據 Table::insert([ 'name' => 'test', 'age' => 20 ]); // 批量插入數據 Table::insert([ [ 'name' => 'test', 'age' => 20 ], [ 'name' => 'test', 'age' => 20 ], [ 'name' => 'test', 'age' => 20 ] ], TRUE); // 更新數據 Table::update([ 'name' => 'test' ], [ 'age' => 30 ]); // 寫入或更新,如果存在則更新,不存在則寫入 // 第一個參數為查詢條件 // 第二個參數為數據不存在時的寫入信息 // 第三個參數為數據存在時的更新信息 Table::insertOrUpdate([ 'name' => 'test' ], [ 'name' => 'test', 'age' => 25 ], [ 'age' => 20 ]); // 如果只希望在數據不存在時寫入數據,則第三個參數不傳,例如: Table::insertOrUpdate([ 'name' => 'test' ], [ 'name' => 'test', 'age' => 25 ]); } // 遞增,ID為的的數據點擊數遞增1 Table::inc([ 'id' => 1 ], [ 'hit' => 1 ]); // 遞減,ID為的的數據點擊數遞減1 Table::dec([ 'id' => 1 ], [ 'hit' => 1 ]); ~~~
                  <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>

                              哎呀哎呀视频在线观看