Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2010
    Posts
    1

    Unanswered: mysql mass delete

    Hi friend,
    My site got hack attack. this hacker put unpleasant sentence in all my articles. I have huge number of articles, I just wondering is it possible to delete unpleasant sentence in all my articles from database? so i can delete it in one go..
    Last edited by dwidb; 12-29-10 at 02:43.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yes it's possible
    Code:
    UPDATE sometable 
       SET somecolumn = REPLACE(somecolumn,'bad sentence','')
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2011
    Location
    Cialis canada online
    Posts
    1
    You can also do it without php by just using phpmyadmin's search function. B

    But before making any changes I recommend to find the hole in your security to prevent future attacks.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by drhalens View Post
    You can also do it without php ...
    who mentioned php?

    but you're right, closing the door is a good idea
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •