Programming Tips: Search and Replace in PHPMyAdmin

Home/Programming Tips: Search and Replace in PHPMyAdmin

One of the best things about being a web programmer is that you get to share your knowledge with the programming community out there.

Today’s little snippet comes in the form of a simple Search and Replace for a string in PHPMyAdmin. Gone are the days where you needed to write a little script to handle the string replacement, it’s now as simple as the following.

We’ll use the example that a programmer needs to update the database table your_table_name, replacing all instances of his old domain name, domainone.com, with his new domain name, domaintwo.com

1. In PHPMyAdmin, click the Query tab.

2. In the Query box, submit the following query (make sure you back up the database or table before doing this).

UPDATE your_table_name SET your_table_name.column_name= REPLACE(your_table_name.column_name, "domainone.com", "domaintwo.com");

That’s it. Happy coding.

2017-05-19T15:48:09+00:00 November 5th, 2012|Programming Tips, Web Design Essex|0 Comments

About the Author:

Warren Chandler is a freelance web programmer and web developer, based in Frinton on Sea, Essex. Warren specialises in web programming, web design, corporate identity, copy writing, SEO, logo and print media for home, work, and mobile platforms.

Leave A Comment