Skip to content

Instantly share code, notes, and snippets.

View jamesnw's full-sized avatar

James Stuckey Weber jamesnw

View GitHub Profile
@cmwelsh
cmwelsh / searchreplacedb2.php
Created September 27, 2011 20:46
PHP/MySQL: Search and replace database including serialized fields
<?php
// Safe Search and Replace on Database with Serialized Data v2.0.0
// 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.