Gossamer Forum
Home : Products : Gossamer Links : Discussions :

mass update...

Quote Reply
mass update...
Hi

A domain name that we have about 100 links from just changed olddomain.com to newdomain.com

Is there a way in the sql quey to update all links from the old URl to the new one?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] mass update... In reply to
First of all, try;

SELECT * FROM lsql_Links WHERE URL LIKE 'http://www.olddomain.com%'

(the % must be at the end)

This will show you the links that will need to be changed. Then use something like;

UPDATE lsql_Links SET URL = REPLACE(URL,'http://www.olddomain.com','http://www.newdomain.com')WHERE URL LIKE 'http://www.olddomain.com%'

That should do the job (please be sure to keep a backup of your database though, in case it doesn't have the desired effect).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] mass update... In reply to
Thanks Andy.. that worked.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory