Archive for the ‘MySQL’ Category

This is a real timesaver. Instead of updating all your x records, you simple execute the following query:

UPDATE table SET column_name = REPLACE(column_name,"string_to_replace","string_new")

In this example I replace all the é’s that exist in the database to its proper version:

UPDATE contents SET content = REPLACE(content,"é","é")

Enjoy!


top