Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $id = 5;
- $a = 1;
- $b = ($a === 2 ? 1 : 2);
- DB::table('table')->where('id', $id)->where('value', $a)->update(['new_value' => 1]);
- DB::table('table')->where('id', $id)->where('value', $b)->update(['new_value' => 2]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement