Announcement

Collapse
No announcement yet.

How can I clean up in 'pagetext'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I clean up in 'pagetext'

    I'm doing a large import from Ikon - over 1.4 million posts.

    I've figured out a lot, but I have text in posts that I need to cleanup. I've tried running cleaner.php. It gets to 800,000 posts fairly quickly, but after that, it just CRAWWWWLLLLS - after 24 hours, I was only at 1.1 million!

    Anyway, here's one example that I'm trying to clean up:

    Code:
    <div class="iF-Passage"><div class="QUOTEHEAD">Quote:(
    I need to replace the above with:

    [code][quote=[/code]

    Can I do this with a SQL statement? If so, what would the syntax be?

    I tried:

    Code:
    SELECT * FROM post WHERE pagetext LIKE '%<div class="iF-Passage"><div class="QUOTEHEAD">Quote:(%'
    Just to see if I could find the rows, but it returned nothing...




    Thanks!

    --Omar

  • #2
    SQL is going to be much faster for sure, cleaner is inefficient on big boards, though easy to use for the majority of imports.

    Which version of MySQL are you using ?
    I wrote ImpEx.

    Blog | Me

    Comment


    • #3
      Originally posted by Jerry View Post
      SQL is going to be much faster for sure, cleaner is inefficient on big boards, though easy to use for the majority of imports.

      Which version of MySQL are you using ?
      5.0.45

      Comment


      • #4
        OK, I think I nearly have it, can you post a example post here that has the text as it is in the database.
        I wrote ImpEx.

        Blog | Me

        Comment


        • #5
          Here ya go. You can see that there's several things that I need to search/replace. I think if I have the syntax for the initial, I can get the rest.

          The other thing I just saw - now that I looked at the actual database data...is all the &codes... I guess I can get those, too.

          One last thing - the 'Â ' that you see, actually shows up as 'Â*' on the board. Odd. Anyway, I guess that can be 'deleted' with a search/replace, too?

          Thanks!

          Code:
          <div class="iF-Passage"><div class="QUOTEHEAD">Quote:(DublD @ Feb. 14 2008, 12:29 PM)</div><div class="QUOTE clearfix"><span class="quoteBegin"> </span>
          <div class="iF-Passage"><div class="QUOTEHEAD">Quote:(BMan @ Feb. 14 2008, 1:28 PM)</div><div class="QUOTE clearfix"><span class="quoteBegin"> </span>
          Well, i wasn't aware of how much $$$ i would end up putting in to mine! Â So, welcome to the madness!!!
          
          Ride within your means. Â Its a gentle giant!<span class="quoteEnd"> </span></div></div>
          +5000 dollars in 1 yr!!!!!!!
          
          Welcome<span class="quoteEnd"> </span></div></div>

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X