当使用Laravel 5 DB类时,如何返回类似于
PHP函数MysqL_affected_rows()的东西,
例如:
DB :: delete(“DELETE FROM chat WHERE id = {$mid}”);
如何返回受影响的行数?
谢谢,
对于update()和delete()调用,返回值是受影响的行数.
原文链接:https://www.f2er.com/laravel/135104.html$affected = DB::delete("DELETE FROM chat WHERE id = {$mid}");