Announcement

Collapse
No announcement yet.

Database question

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

  • Database question

    Hi,
    I recently upgraded my phpbb2 to vbulletin and have a quick question.

    What happen originally is that when I upgraded, I installed the vb as a fresh install, when doing so I put my username as Tom.

    In the phpbb2 my username was also Tom.

    When the upgrade had finished, I didn't notice until a couple of days later, but it put an extra Tom in, so I had two user names as Tom. I thought "ok" I'll delete one, so I did, but now all my old posts show up as Tom and underneath it says "Guest"

    as the old Tom user is no longer in the database but all posts are I was wondering how to change it so they are all my posts again.

    I looked at the sql file and I think I have worked out a way of doing this.


    Would this work. My new user id in the database is 1, and my old user posts are all under the id 2, would changing all my old posts to user 1 work, or would it mess anything up.

    Thanks

  • #2
    sorry, my new posts are under id 1, and all my old posts that I want to show under my updated username have all been put to id 0. if this helps

    Comment


    • #3
      Do you allow guests to post?

      Comment


      • #4
        No I don't allow guest posting, I am actually at the moment trying to do this a different way, I have changed my present username to Tom1 and have added a new Tom, what I'm going to do is try to do a bit of swapping id's in the database. And yes I have made ample backups just incase is boobs up somehow.

        Comment


        • #5
          Just run these two queries:

          UPDATE post SET userid=1 WHERE userid=0;
          UPDATE thread SET postuserid=1 WHERE postuserid=0;

          If you have ever allowed guests to post, userid 1 will get credit for them, that's why I asked.

          Comment


          • #6
            Ah thanks I'll give it a go, as that last try didn't work

            Comment


            • #7
              Ah, thanks very much for that, it worked fine, that saved me hours that did.

              Thanks you're excellent

              Comment


              • #8
                np

                Comment

                Loading...
                Working...
                X