Announcement

Collapse
No announcement yet.

Change UserID's?

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

  • Change UserID's?

    How would I take an existing member ID, say 50, and change their member ID to 2, and have all of their posts added to 2 and ID 50 would be deleted?

  • #2
    That would require several queries. It's not worth the trouble if you ask me.

    You would need to update every table with a userid column. Use a query like this:

    UPDATE table_name SET userid = new_id WHERE userid = old_id

    Comment


    • #3
      The reason I ask is I converted from phpBB - vB a year or so back and for some reason the conversion change my admin account from UID1 to 4... Is there a way to switch back?

      Comment


      • #4
        Originally posted by ogden2k
        Is there a way to switch back?
        Yes, but running tons of UPDATE queries.

        Comment


        • #5
          How many queries? Maybe I'm better off not doing anything, :|

          Comment


          • #6
            I don't know how many without checking every table in the database. You need to run a query for every userid field in every table.

            It would be a lot of effort to change something that isn't a problem in the first place.

            Comment

            Loading...
            Working...
            X