Search and Repalce - MySQL
When I first started building mys computer components website I was totally new to programming - I knew a little HTML but that was it.
Thankfully on the Internet there are a few helpful people who are willing to share their skill of PHP and MySQL.
You can use this code in phpmyadmin or any other database manager
UPDATE table name SET Table Field = replace(table field,"string to find","string to replace")
On of the things that I found really helpful was how to search for a specific string within a database and replace that string. There are hundreds of reasons that you may wish to do this but an example is this:
Say within your site you are optimising you product pages and you want to ensure you internal linking structure points your users to the correct pages. You could search for every instance of ” computer components ” and make it link to the relevant page. This is great fro SEO purposes.
Of course there are other reasons why you may use it, perhaps you want to add a style or class to every table. This is made easy with search and replace.






April 30th, 2009 at 12:32 pm
That is a great tip. It does make a difference in Seo if you do this. Since it takes very little time everyone should do it to help sites seo.
marks last blog post..Broadband phone voip service.
May 9th, 2009 at 4:43 pm
Omg this rocks! This would be great for SEO. Thank you very much!
May 15th, 2009 at 8:57 am
Well there’s something I didn’t know. Right now I’m about where you were when you first started. As you said, great for SEO, but it seems that it would also be a big timesaver. Thank you for the tip.
*bookmarked*
Robs last blog post..SNG Strategy Pt. 2 - Make money playing Sit and Go poker tournaments
May 16th, 2009 at 11:13 am
That is a good idea. It does seem to help seo of the site and should let you get more traffic.
cathys last blog post..Hotels in key west.
May 28th, 2009 at 5:22 pm
I tried my best, but I had to break down and outsource from Elance.
May 28th, 2009 at 8:15 pm
Thanks i have to try and do this. I know it helps each page in search engines and should help get more website traffic.
amys last blog post..Mold removal.
June 10th, 2009 at 6:47 pm
I was wondering if this code can be used in ASP.net. I am kind of novice in this. Please help me out.
June 13th, 2009 at 12:09 pm
Very impressed with the knowledge you are posting here. Thanks for sharing and let us know more about new releases. 642-825 exam
June 21st, 2009 at 9:53 pm
That seems like a great concept for SEO. I know next to nothing about web design, I’ve started stumbling around CSS and XHTML, php is a mystery to me.
June 28th, 2009 at 3:14 pm
Ahhh well, I dont code so it’s all gobbledygook to me. Will point my coder to it though and see if it is of use
June 30th, 2009 at 10:10 pm
This is an enormous time saver, thank you !
July 2nd, 2009 at 6:40 pm
The best example over the net. I have been (re)searching this topic for quite some time unfortunately there is a bunch of logs quoting this “update [table_name] set [field_name] = replace([field_name],’[string_to_find]‘,’[string_to_replace]‘);”
which works only in the most idiotic cases. The examples above are golden
Thanx!
July 15th, 2009 at 1:01 am
great blog I love that you keeped your blog keywordluv thanks.
August 2nd, 2009 at 5:49 pm
Nice tips here!
Thanks for the linkback to my site because of keyword luv
August 15th, 2009 at 7:32 am
Well, I really admire SQL and html.
I think people who want to get settled with internet world or make money out of it, should get at least very basic foundation of both.
August 18th, 2009 at 7:40 am
A veru useful little string there - one that my low level of coding knowledge wouldn’t have allowed me to create on my own, so thankyou!
August 22nd, 2009 at 2:04 am
Great tip! thank you.
Does this SQL sentence work with mssql aswell? Anyone?
August 22nd, 2009 at 11:47 am
Well, I too admire SQL and html.
These are very easy to learn and they pay you higher.
August 22nd, 2009 at 11:50 am
Besides having some computer knowledge one must have command over English.
October 6th, 2009 at 11:19 am
I am very impress this site. sql server is very nice, so thanks for this post.
October 17th, 2009 at 7:47 pm
Thank u ver much for posting such a nice article on sql
October 25th, 2009 at 8:18 pm
This is an amazing idea. Thanks for this excellent tip which would be very useful for seo. I will bookmark your site. Thanks a ton for posting such an awesome article. Love to read most of your writings.
October 27th, 2009 at 2:38 pm
Its a great tip.I am experiencing it in my daily work.Thanks for such valuable post.
November 14th, 2009 at 12:01 pm
i think its a great tip and i really like this stuff its time saver.
November 17th, 2009 at 7:47 am
this is a great tip and pretty impressive and thanks for sharing
November 18th, 2009 at 11:14 am
I like phpmy admin to do the database stuff - it’s easier
November 23rd, 2009 at 1:01 pm
this is wonderful to read and pretty interesting and sql server is nice and thanks for sharing.
December 2nd, 2009 at 7:40 am
well i don’t have so much knowledge of mysql but i have knowledge of HTML,this is good to read,
thanks!
December 5th, 2009 at 5:42 pm
Wrong query syntax may ruin the field you are performing replace on, so always backup first.