vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Manipulating post table with phpmyadmin (https://vborg.vbsupport.ru/showthread.php?t=270915)

0ptima 09-26-2011 01:45 AM

Manipulating post table with phpmyadmin
 
Somehow a member's account has been hacked and hundreds of posts have edited with links to spam.

I would like to run a mysql query on the post table to remove the spam links. I have come up with the following query

Code:

update post set pagetext = replace(pagetext,'\n________\nspammer text','')
where `userid` = 123

This seems to do the trick and I tested it on a local installation. I was would like to know if there are any consequences of running such a query on my real forum and if there is a better way of deleting the spam links. Thanks.

Alfa1 09-26-2011 04:07 AM

I think it would be more efficient to use the post edit history instead. So instead of finding and replacing that spam text, roll back all posts that have been edited between date A and B, to the previous version.

0ptima 09-27-2011 01:47 AM

Thanks for the idea. How would I do that? (im on vb 3.8)

souperman 09-27-2011 10:56 PM

You're query seems fine. I would add a LIMIT 100 and run it a few times just so your db doesn't hang.


All times are GMT. The time now is 07:03 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00909 seconds
  • Memory Usage 1,712KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete