php - MySQL autoincrement problem -


I have an auto-assignment field, for example I have 1,2,3 values, when I put 4 and it Removal will usually be the next 5. I delete 5 and after a long time, 1 week says that when I put a new record next time 4 happens.

Can someone tell me why this happens, why the last entry ID of this table after new record is obtained after a long time, and it is not taking into account the deleted records.

PS: It happens after a long time, it's working fine when I'm doing it in a short period

Remember the last auto-increment value for table column is stored only. It is not written for a table or something else so if you restart your server (i.e. for backup) the last penny value (5) is lost and the table scans for the last value in the mysql table.


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -