1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Removing unwanted text in database

Discussion in 'Blogging' started by ronegraT, Mar 28, 2011.

  1. ronegraT

    ronegraT Power Member

    Joined:
    Dec 29, 2010
    Messages:
    620
    Likes Received:
    101
    Occupation:
    sleeping
    Location:
    Sweden
    Its like this, i have a couple of db´s filled whit information, how could i remove some lines in every post.

    For example i have one db whit 40k posts which contains urls to other sites which i want to remove.

    what is the easiest way, setting it up whit WP and use plugins or use some special command whit PHPmyadmin, or is there any good program for windows?
     
  2. chris456

    chris456 Regular Member

    Joined:
    May 17, 2010
    Messages:
    281
    Likes Received:
    567
    Does all those unwanted links - text have something in common ? Some word , symbol , <tag> etc?
     
  3. ronegraT

    ronegraT Power Member

    Joined:
    Dec 29, 2010
    Messages:
    620
    Likes Received:
    101
    Occupation:
    sleeping
    Location:
    Sweden
    Yes

    What i can see, it has the same link name and title on all posts, also the same adresses
     
  4. chris456

    chris456 Regular Member

    Joined:
    May 17, 2010
    Messages:
    281
    Likes Received:
    567
    so it is easy , try to download TextPipe here on BHW it can manage easily several GB files and I would try to convert it in txt file , if this would be difficult TextPipe maybe should remove this pattern also directly from .sql file.

    TextPipe has a filter for removing text pattern together with whole line which belongs to that string.
    1.It is something like this :
    Filters\Remove\Remove lines\Remove matching lines (1 the same unwanted text or \Remove lines from a list(more unwanted patterns)

    It will remove the lines from several GB file in few minutes

    or second option :
    2.if you want only exact text (not lines where lives that string)so use find and replace :

    Filters\Replace\Find EasyPattern

    find your string and replace with "nothing" and it will find you all hundreds or thousands strings and it will change that to nothing