i'm new in laravel , i'm trying update mysql table's multiple rows using 1 query. need update example 100 rows this:
$q = \db::table('exmaple') ->where('exampleid', $array) ->update(array('viewed' => 1));
$array array id-s. have try implode array string, execute query, no result. can help?
does work you:
$q = \db::table('example') ->wherein('exampleid', $array) ->update(array('viewed' => 1));
wherein() accepts array second parameter ids in array affected query.
Comments
Post a Comment