This file contains 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
#!/usr/bin/php | |
<?php | |
/** | |
* PHP script that perform a find and replace in a database dump (tested with | |
* MySQL) with adjustments of the PHP serialize founded. | |
* | |
* Don't forget to escape your "special characters": | |
* "a$b" -> "a\$b" | |
* "a"b" -> "a\"b" | |
* "a`b" -> "a\`b" |
This file contains 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
<?php | |
/** | |
* | |
* Safe Search and Replace on Database with Serialized Data v2.0.1 | |
* | |
* This script is to solve the problem of doing database search and replace when | |
* developers have only gone and used the non-relational concept of serializing | |
* PHP arrays into single database columns. It will search for all matching | |
* data on the database and change it, even if it's within a serialized PHP | |
* array. |