[RESOLVED] Moved articles, need to change urls in database
I've tried several querys in an attempt to change the urls of my articles stored in my database. So far, none have worked. Here's an example:
SET 'url' LIKE '%http://www.newsite.com/library%'
WHERE `url` LIKE '%http://www.old-site.com/articles%'
SET `url` = REPLACE(`url`, 'http://www.old-site.com/articles', 'http://www.newsite.com/library')
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Thanks NogDog. Here's the final solution:
For reference, see http://www.sqlteam.com/article/using...date-statement
UPDATE articles SET url = replace(url, 'http://www.old-site.com/articles', 'http://www.newsite.com/library')
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)