Dirsovisk

Houses SQL

May 3rd, 2018
119
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- 1- Copiar itens da casa para o dp
  2.  
  3. INSERT INTO player_depotitems
  4. (player_id, itemtype, COUNT)
  5.  
  6. SELECT players.id, ti.itemtype, ti.COUNT
  7. FROM tile_items ti
  8. JOIN tiles ON tiles.id = ti.tile_id
  9. JOIN houses ON houses.id = tiles.house_id
  10. JOIN players ON players.id = houses.owner
  11.  
  12.  
  13.  
  14. -- 2- Limpar itens das casas
  15.  
  16. DELETE FROM tile_items ti
  17. WHERE houses.owner = players.id
  18. AND ti.tile_id = tiles.id
  19. AND tiles.house_id = houses.id
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×