[quote name='Mark H' timestamp='1343095605' post='2290263']
Not sure what you mean by "Citation?". But that user is correct. Manually running queries on any table is a very bad idea, unless you know exactly what you're doing.
And even if you do know exactly what you're doing......always, always, get a backup of the database prior to doing so. ;)
You know how Murphy works. Have a backup, you'll never need it. Fail to have a backup, and ......
I asked for citation because I wasn't sure if the "running a query is never a good idea" statement was backed by a valid reason I shouldn't, or just unsupported fear of performing any action on the database.
I tweaked PrinceOfAbyss' syntax a bit since I don't use prefixes:
I ran the query a couple different ways on content_cache_posts (image links appeared wrapped in lightbox span and as plain text lURLs). Images and references were completely purged after that, but dropped the cached posts anyway from AdminCP as per Michael's suggestion.
Many thanks to both PrinceOfAbyss and Michael on this one.
And yes, I ran mysqldump beforehand (and have two weeks of nightly off-site backups). Bring it on, Murphy. :P UPDATE posts SET post=REPLACE(post, '[img=http://link.to/image.jpg]', '');
I have a problem user that has been attaching an objectionable image to every one of his posts.
He's managed to rack up about 300 posts with attached image. Rather than manually editing every one of his posts, or deleting them outright, is there a sql query I can run to remove [img=http://link.to/image.jpg] from all posts on the forum?