Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. $id = 5;
  2. $a = 1;
  3. $b = ($a === 2 ? 1 : 2);
  4.  
  5. DB::table('table')->where('id', $id)->where('value', $a)->update(['new_value' => 1]);
  6. DB::table('table')->where('id', $id)->where('value', $b)->update(['new_value' => 2]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement