Jump to content
MakeWebGames

got a question


Hybrid

Recommended Posts

hey, im a beginner at coding and just was wondering if someone could help me with this...

I had an old sql, in the sql there's user ID and lots of users so I deleted them and now when u sign up it starts with the last ID instead of ID 1. (eg. I made myself an account and im ID 99, no one else in the game)

if I said anything stupid then im sorry.. still learning :)

Link to comment
Share on other sites

hey, im a beginner at coding and just was wondering if someone could help me with this...

I had an old sql, in the sql there's user ID and lots of users so I deleted them and now when u sign up it starts with the last ID instead of ID 1. (eg. I made myself an account and im ID 99, no one else in the game)

if I said anything stupid then im sorry.. still learning :)

Are you currently the only user on the game

Link to comment
Share on other sites

Change your id to 1 and then try registering again it now should be id 2 i can fix this for you if you cant do it msg me

Ughhh, just because you manually alter the ID doesn't mean the database won't still count from 99, you need to reset the AI value back to 1

Link to comment
Share on other sites

try running this in your SQL tab in your phpmyadmin:

This will delete everything in your users table and set it back to start at 1 again:

TRUNCATE table users;

This will not delete it but set it back to start at 1. But if you are registered already and did what jcvenom said you may run into problems so change the 1 to a 2 and you should be good to go.

ALTER TABLE users AUTO_INCREMENT = 1;
Link to comment
Share on other sites

try running this in your SQL tab in your phpmyadmin:

This will delete everything in your users table and set it back to start at 1 again:

TRUNCATE table users;

This will not delete it but set it back to start at 1. But if you are registered already and did what jcvenom said you may run into problems so change the 1 to a 2 and you should be good to go.

ALTER TABLE users AUTO_INCREMENT = 1;

As he has an account, it would look more like;

 

UPDATE `users` SET `userid` = 1 WHERE `userid` = 99;

 

Followed by;

 

ALTER TABLE users AUTO_INCREMENT = 2;

 

Of course, this also means that any items, mail, events etc etc etc, shall be given to, and accessible, to whoever signs up and managed to get the ID 99.

With that in mind, it's probably best to truncate ALL tables with anything assigned to a user and then just recreate the admin account.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...