Page 1 of 1

Replace all hardcoded links in database - MySQL code

Posted: Wed Jan 30, 2008 1:09 am
by PavlovaPete
Hi all,

we have a requirement to replace about 1800 hardcoded links within our database. I'm planning to use an UPDATE REPLACE query - is this the best way to go?

Old link: http://www.oursite.com/shop/prod.php?it ... ategory=14
New link: http://www.oursite.com/shop/prod.php?item=12

SQL:
UPDATE jos_content SET fulltext=REPLACE(fulltext,'item=12&category=14','item=12')

Any better suggestions would be very welcome.

Cheers

my gosh I'm a joombie  :laugh: