DB::connection()->enableQueryLog();#開啟執行日志 $count = DB::table('test') //執行查詢 ->whereNull('deleted_at') ->where('id', '=', 3) ->where('Name', '=', '測試') ->count(); print_r(DB::getQueryLog()); //獲取查詢語句、參數和執行時間
DB::connection()->enableQueryLog();#開啟執行日志 $count = DB::table('test') //執行查詢 ->whereNull('deleted_at') ->where('id', '=', 3) ->where('Name', '=', '測試') ->count(); print_r(DB::getQueryLog()); //獲取查詢語句、參數和執行時間
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。