The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
MySQL Search and replace
Hello Everyone,
While I'm getting better at MySQL I am not this good yet, so, here I am. I renamed my domain from http://www.tomshawk.com to http://www.tech-unity.com and while doing searches of templates for static urls and replacing them was quick and easy. Doing that in the Database, and or Forums, is tedeous to say the least. What I am wondering is. Is there a way to set up a script, to search the DB and do this replacement for me. It would save me a heck of alot of time. Thanks in advance for any help you can provide. |
#2
|
||||
|
||||
Quote:
If a mod wants to move it, please feel free. |
#3
|
||||
|
||||
<a href="https://vborg.vbsupport.ru/showthread.php?t=38552&highlight=mysql+search+repl ace" target="_blank">https://vborg.vbsupport.ru/showt...search+replace</a>
|
#4
|
||||
|
||||
Quote:
Should it be Code:
UPDATE post SET clmName = REPLACE(clmName, 'http://www.tomshawk.com', 'http://www.tech-unity.com'); Is it Column name, and just for giggles and a guess, would it be "pagetext" so the line would look like Code:
UPDATE post SET pagetext = REPLACE(pagetext, 'http://www.tomshawk.com', 'http://www.tech-unity.com'); |
#5
|
||||
|
||||
Just to cover all your possibilities, [sql]UPDATE post SET pagetext = REPLACE(pagetext, 'tomshawk.com', 'tech-unity.com');[/sql]But you have it right, well done
|
#6
|
||||
|
||||
Thank you Natch,
It worked perfectly To bad we cant gice Reputation/karma here, You deserve some |
#7
|
||||
|
||||
Cheers
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|