Advertisement
Guest User

Untitled

a guest
Jul 4th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. before.each do |pre_id|
  2.  
  3. after.each do |post_id|
  4. puts "post id " + post_id[1] + " and pre id " + pre_id[1]
  5. if pre_id[1] == post_id[1]
  6. @store_id = post_id[0]
  7. end
  8. end
  9.  
  10. puts "inserting " + @store_id + " which is replacing " + pre_id[0]
  11. sql.query("UPDATE tabs SET product_id='#{@store_id}' WHERE product_id='#{pre_id[0]}';")
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement