Created
February 27, 2014 09:54
-
-
Save ticklemynausea/9247275 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| # | |
| # Minecraftia! Inquisitor json mapped 'org.bukkit.entity' remover | |
| # v1.0 | |
| # | |
| require 'bootstrap.php'; | |
| use minecraftia\db\Bitch; | |
| $q = "SELECT name, mapped FROM inquisitor.players p WHERE p.mapped LIKE '%bukkit%' LIMIT 1;"; | |
| $result = Bitch::source('inquisitor')->all($q); | |
| foreach ($result as $r) { | |
| $j = json_decode($r["mapped"], true); | |
| unset($j["mobsKilled"]["org"]); | |
| $mapped = json_encode($j); | |
| $q = "UPDATE inquisitor.players p SET p.mapped = :mapped WHERE p.name = :name"; | |
| $result = Bitch::source('inquisitor')->query($q, compact('mapped', 'name')); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment