15.09.2012, 20:49
1. Your primary key auto-increments (AUTO_INCREMENT), because all keys are unique the key is always incremented and never re-used, even when rows are removed. If you have 10 accounts (keys 1 to 10) and you remove all 10 of them the next value will still be 11, regardless of the amount of rows. You can reset your AUTO_INCREMENT value using something like:
2. Do you reset your enum values when a player connects? It's likely that they are not reset (set back to 0 or whatever you want their default values to be) when a player crashes and the next player that joins with that ID will still have the old values.
Код:
ALTER TABLE `table_name` AUTO_INCREMENT = 0;