News:

Wondering if this will always be free?  See why free is better.

Main Menu

SQL Query find and replace

Started by Sven Kortekaas, January 04, 2013, 09:56:10 AM

Previous topic - Next topic

Sven Kortekaas

Hello,

I got a little problem. I got a big forum and some poeple back in 2005 and later posted some pictures from this host: photos.lycos.com [nofollow] but that gives me malware warnings from Google Chrome. Is there a SQL query that I can run searching my whole forum for images from this host and replace them with the text: "Sorry your image have been removed due to security issues."

vbgamer45

That's a little tricky. You could disable the link easily by doing sql search and replace on photos.lycos.com
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sven Kortekaas

Oke. In the phpMyAdmin I can easily do an search and replace?

Find: photos.lycos.com [nofollow]
Replace: deleted

Then this [img]photos.lycos.com/hello/directory/test.jpg[/img] will be [img]deleted/hello/directory/test.jpg[/img]

vbgamer45

Here is code you can try

Please make a database backup first though just in case.


UPDATE smf_messages set body = REPLACE(body,  'photos.lycos.com', 'deleted')
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Rob Lightbody

Quote from: vbgamer45 on January 04, 2013, 10:06:24 AM
Here is code you can try

Please make a database backup first though just in case.


UPDATE smf_messages set body = REPLACE(body,  'photos.lycos.com', 'deleted')


That's worked perfectly for me.  I've used it to change URLS from http to https (my own site itself, flickr and youtube) and to remove redundant imgshack links that don't work.

Advertisement: