View Single Post
Old 11-27-2012, 05:46 PM  
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally Posted by Adraco View Post
Do this, and follow Woj's precaution tips.

What I do, is to build a list of the words I want to replace, put them in Excel, in column A and downwards as far as I need to go (remember to use import as csv or whatever file format you have your 1000 words in).

And then do the same for column B for the words you want to replace with.

Then build a function, in column C, like:
update tablename set field=replace(A1','B1');

where A1 is the word you want to replace and B1 the word you want to replace with. Double click on the black square in the excel cell and let it auto fill downwards.


And then in column D, build then all together, with the & sign, like this:
=C1&C2&C3&C4
to make it return:
update tablename set field=replace(A1','B1');
update tablename set field=replace(A2','B2');
update tablename set field=replace(A3','B3');
update tablename set field=replace(A4','B4');


Then copy the full
update tablename set field=replace(A1','B1');
update tablename set field=replace(A2','B2');
update tablename set field=replace(A3','B3');
update tablename set field=replace(A4','B4');


and paste it into phpmyadmin in the SQL command line and run it.

Just remember that it is, indeed, very powerful, one mistake from you along the way and changes will be done accordingly, so be very careful and take al the necessary precautions!
glad you got it worked out, but those queries are all wrong, needs to be:
update tablename set field=replace(field,'string_to_replace','string_to _replace_with')
like sarettah explained earlier...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote