Replace all hardcoded links in database - MySQL code Topic is solved

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
PavlovaPete

Replace all hardcoded links in database - MySQL code

Post by PavlovaPete » Wed Jan 30, 2008 1:09 am

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:
Last edited by PavlovaPete on Wed Jan 30, 2008 4:41 am, edited 1 time in total.

Post Reply