Merge same-named threads in a forum via mySQL?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rik Brown
    Senior Member
    • May 2005
    • 345
    • 4.2.X

    Merge same-named threads in a forum via mySQL?

    We have a forum with many separate threads of the same name. We would like to merge separate threads with the exact same name/spelling so there are not all those duplicate named threads (i.e. only uniquely named threads in that forum).

    I'm not aware of any way to do this within vb 3.6.x. Would anyone be able to advise how one could accomplish this with mysql queries?

    Thanks. -- Rik

    ps: We actually have quite a few forums we'd like to apply this to but if we can do it with one we can apply the same to other forums. Its just way too many messages to attempt this manually such as by inline moderation.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    The thread merge feature requires that you manually specify both threads. There is no option to add the logic you are wanting. You can do this with custom code, but that is a www.vbulletin.org question.

    Comment

    • Rik Brown
      Senior Member
      • May 2005
      • 345
      • 4.2.X

      #3
      Jake:

      I really didn't want to change vB at all. Just wanted to learn how to run a mySQL query to achieve that outcome.

      Thanks. -- Rik
      Last edited by Rik Brown; Mon 1 Jan '07, 6:10am.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        It should be possible to directly query the database to accomplish what you want, but there may be unforeseen problems if you don't update all appropriate records. It is better to use the vBulletin API to ensure that all appropriate changes are made.

        If I had to guess at manual changes, I would say that you need to update the thread and post tables. Delete the thread record for one thread, making a note of its threadid. Then update all post records with the old threadid so they point to the new threadid. There are other tables that reference threadids which might also require updating. You will probably need to update counters when you are done:

        Admin CP -> Maintenance -> Update Counters

        I am unsure of this procedure since I have never tried it before. We cannot support this.

        Comment

        • feldon23
          Senior Member
          • Nov 2001
          • 11291
          • 3.7.x

          #5
          There is no MySQL schema (documentation) for vBulletin 3.6. You will have a LOT of problems if you try to do a merge without affecting all the interdependent tables.

          Comment

          • Rik Brown
            Senior Member
            • May 2005
            • 345
            • 4.2.X

            #6
            Originally posted by Jake Bunce
            It should be possible to directly query the database to accomplish what you want, but there may be unforeseen problems if you don't update all appropriate records. It is better to use the vBulletin API to ensure that all appropriate changes are made.

            If I had to guess at manual changes, I would say that you need to update the thread and post tables. Delete the thread record for one thread, making a note of its threadid. Then update all post records with the old threadid so they point to the new threadid. There are other tables that reference threadids which might also require updating. You will probably need to update counters when you are done:

            Admin CP -> Maintenance -> Update Counters

            I am unsure of this procedure since I have never tried it before. We cannot support this.
            Well, Jake, I can report back that what you laid out works fantastically! It being my first php program, it took me several days to get it right. But it sure is helping us.

            Thanks for the suggestions. -- Rik

            Comment

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