Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. $table_one_records = $table_one->find('all')->where(['some xyz condition']);
  2. foreach($table_one_records as $key => $value){
  3. $table_two_record = $table_two->find('all')->where(['any condition goes here']);
  4.  
  5. UPDATE table_two SET column1 = $table_two_record['column2'], column2 = null WHERE `id` = $table_two_record['id'];
  6.  
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement