MySql Statement

Mar 7, 03:14 PM

phpMyAdmin search and replace
Here is a great tip that can save you hours of work. Sometimes you have messed up characters in your database – wrong character encodings – or you want to strip out some text in a certain table’s field. In phpMyAdmin, open up the SQL dialog and use the following code (change tablename and tablefield to your name and field values):

UPDATE tablename SET tablefield = replace(tablefield, “findstring”, “replacestring”);

You can also tack on a WHERE statement, if you like.

Comment

 
---