MySQL Auto Increment
#1

Okay, basically for each account that is created an accountid is assigned, however, when I delete account 13 (There being 16 accounts), the next account to register is 17 even though it should be 13. It should be picking the smallest available number, rather than continuing even after deleting them.

Any ideas how I can do this?
Reply
#2

You can't, that defeats the purpose of the auto increment. May I ask why you would even want it this way? If you found a way, it would be impractical.
Reply
#3

Because when deleting an account, it leaves the accountid un-used.
Reply
#4

Even though i think it is kind of stupid, try this:

When you delete an account, have it pull the the largest id in the database, and change that accounts id, to the deleted accounts id.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)