MySQL issues
#2

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:

Код:
ALTER TABLE `table_name` AUTO_INCREMENT = 0;
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.
Reply


Messages In This Thread
MySQL issues - by HighFlyer - 15.09.2012, 20:08
Re: MySQL issues - by Sinner - 15.09.2012, 20:49
Re: MySQL issues - by HighFlyer - 15.09.2012, 20:58
Re: MySQL issues - by Vince - 15.09.2012, 21:59
Re: MySQL issues - by HighFlyer - 15.09.2012, 22:07
Re: MySQL issues - by Vince - 15.09.2012, 22:10
Re: MySQL issues - by HighFlyer - 16.09.2012, 17:17
Re: MySQL issues - by HighFlyer - 18.09.2012, 15:33

Forum Jump:


Users browsing this thread: 3 Guest(s)