Search and Replace using Mysql | mysql | technical guides | Support | Clear Intent- How to use a single line of mysql to quickly search and replace

 

Search and Replace using Mysql | mysql | technical guides | Support | Clear Intent

Simple search and replace using  MySQL.

Using a mysql database it is possible to very quickly perform a simple search and replace using a single line of SQL. This saves hours of manual editing or the overhead of using code like PHP or similar to churn through database result sets.

UPDATE tablename SET tablename.field = REPLACE (tablename.field, 'replace_this', 'with_this');

Thanks to URBAN mainframe for this little GEM.

 

 

© 2008 Clear Intent All Rights Reserved
powered by clear cms