PDA

View Full Version : Pls help. SQL query required to recreate a user with an ID of 1.


Mr L
12-15-2002, 02:19 AM
I have used an unoffical patch to merge two VB databases together. Worked like a dream.

Later I merged some surplus accounts including the admin one. All seemed fine. A couple of weeks later (now), I notice that my ID has changed to X (new user ID) and the original user ID of 1 is gone. A mistake on my behalf here.

I need to recreate a user account with an ID of 1 and then manually do privilages etc. Can anyone help?

I am assuming that I can run an SQL query, but don't know what to run.

I still have full admin access to the board, but some scripts are not working as they look for user with an ID of 1.

Thanks.

Mr L
12-15-2002, 11:31 AM
I've now had some help at vBulletin.Com, but they have recommend I ask you guys for the final piece of the puzzle.

The new user ID created via an SQL query they gave is not number 1. So effectively, I could have done this via the CP.

What I need to do is run a command to alter a users ID to one that I know is not in use as the account is no longer there.

I would be very grateful for any help here.

Xenon
12-15-2002, 12:06 PM
hmm, you can just alter your userid

following queries:
UPDATE user SET userid=1 WHERE userid=x
UPDATE userfield SET userid=1 WHERE userid=x
UPDATE post SET userid=1 WHERE userid=x
UPDATE privatemessage SET userid=1 WHERE userid=x

x is you userid now...
after that update the thread information :)