【发布时间】:2015-05-26 06:06:28
【问题描述】:
我想在 Laravel 更新查询的 Where 子句中推送一个数组。
这是更新查询。
DB::table('users')->where('id', 1)->update(array('votes' => 1));
是否可以使用如下查询??
$array_of_ids;
DB::table('users')->where($array_of_ids)->update(array('votes' => 1));
谢谢
【问题讨论】:
-
使用
whereIn更新