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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                - 數據庫操作 ~~~ use Illuminate\Support\Facades\DB; DB::select("select * from users where name=?",['admin']); //也支持name=:name,[':name'=>'admin']綁定,返回obj DB::insert('insert into users (id, name) values (?, ?)', [1, 'Dayle']); $affected = DB::update('update users set votes = 100 where name = ?', ['John']); 返回影響行數 $deleted = DB::delete('delete from users');返回影響行數 DB::statement('drop table users'); 其他無返回語句 DB::transaction(function () { 事務 DB::table('users')->update(['votes' => 1]); DB::table('posts')->delete(); }); $list = DB::table("users")->get()->toArray();//獲取全部轉換成數組 DB::table("users")->first() 獲取一行 DB::table("users")->value('email'); 獲取一個字段 DB::table("users")->pluck('email')->toArray(); 獲取一列,如果設置兩個pluck('name','id') id是鍵name是值的鍵值數組 count() 結果集數量 max('price')最大值 min('price')最小值 avg('price')平均數 sum('price')求和 DB::table('users')->select('name', 'email as user_email')->get(); 返回特定字段 whereRaw('price > IF(state = "TX", ?, 100)', [200]) 原生where orderBy('name', 'desc') inRandomOrder()隨機排序 join('contacts', 'users.id', '=', 'contacts.user_id') 內連接 leftJoin('posts', 'users.id', '=', 'posts.user_id') 左連接 groupBy('account_id') 分組 groupBy('first_name', 'status') having('account_id', '>', 100) 刷選 take(5) 返回5條 ->offset(10) ->limit(5) 限制 insert( ['email' => 'john@example.com', 'votes' => 0]); 插入 支持多條數據 $id=DB::table("users")-> insertGetId( ['email' => 'john@example.com', 'votes' => 0]); 插入后返回id update(['votes' => 1]); 更新 increment('votes', 5);decrement('votes', 5);自增自減 increment('votes', 1, ['name' => 'John']); 支持其他字段更新 DB::table('users')->truncate(); 清空表 DB::table('users')->where('votes', '>', 100)->delete(); 刪除 $users = DB::table('users')->paginate(15); 分頁 $users = DB::table('users')->simplePaginate(15); 簡單分頁只有上一頁下一頁 $results->total() 總頁數 <div class="container"> @foreach ($users as $user) {{ $user->name }} @endforeach </div> {{ $users->links() }} ~~~ - redis ~~~ use Illuminate\Support\Facades\Redis; Redis::get('id'); Redis::set('name', 'Taylor'); Redis::command('set', ['name',34]); 支持所有原生 ~~~
                  <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>

                              哎呀哎呀视频在线观看