Posts: 218
Threads: 47
Joined: Apr 2011
Reputation:
0
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?
Posts: 1,905
Threads: 63
Joined: Oct 2011
Reputation:
0
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.
Posts: 218
Threads: 47
Joined: Apr 2011
Reputation:
0
Because when deleting an account, it leaves the accountid un-used.
Posts: 721
Threads: 58
Joined: Sep 2009
Reputation:
0
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.