PDA

View Full Version : Is there a query to replace...


DrkFusion
10-06-2002, 12:51 AM
I would like to know a mysql query that will replace every instance of X with Y.

Ex: Every instances of showthread.php is to be replaced with showpoo.php or something :)

Thanks in advance
-Arunan

FWC
10-06-2002, 01:01 AM
Firefly posted this one a while ago. I have used it and it worked for me:

UPDATE table SET column = REPLACE(column, 'oldvalue', 'newvalue');

DrkFusion
10-06-2002, 12:45 PM
Thank FWC,

-Arunan

DrkFusion
10-08-2002, 09:59 PM
How would I update the whole databae, and repalce every instance of 'oldvalue' with 'newvalue' ?

-Arunan

Link14716
10-08-2002, 10:07 PM
Couldn't you just do....

UPDATE * SET column = REPLACE(column, 'oldvalue', 'newvalue');

???

DrkFusion
10-24-2002, 02:22 AM
Possibly not sure, no harm in trying, so I will check it out.

Thanks
-Arunan

Xenon
10-24-2002, 09:07 AM
you know this one?
http://www.vbulletin.org/hacks/index.php?s=&action=showhack&hackid=709