shlomikalfa Posted December 5, 2007 Share Posted December 5, 2007 hello there. whenever i delete somethin in my table the auto_increment seems to just move on as if nothing had happend and i'd like it to fix it's own index to the new next index so that there won't be gaps in my table... is there any MYSQL command that does that ?! please help. [move]thanks in advance![/move] MySQL version: MySQL4.0 Table Type: MYISAM Quote Link to comment https://forums.phpfreaks.com/topic/80214-auto_increment-how-do-i-fix-its-next-index/ Share on other sites More sharing options...
trq Posted December 5, 2007 Share Posted December 5, 2007 If you are relying on the indexes to be incremental you are doing something wrong. Quote Link to comment https://forums.phpfreaks.com/topic/80214-auto_increment-how-do-i-fix-its-next-index/#findComment-406579 Share on other sites More sharing options...
shlomikalfa Posted December 5, 2007 Author Share Posted December 5, 2007 there is no way to have the table's indexes automatically fixed ?! also what about the fixing the automatic increment ? how can i have a table with 53 rows in it and next auto_increment is 63 ?! where did the other 10 went to ?! Row Statistics: Statements Value Format dynamic Rows 53 Row length ø 1,048 Row size ø 1,087 Bytes Next Autoindex 63 Creation Dec 02, 2007 at 04:33 PM Last update Dec 05, 2007 at 01:32 AM Last check Dec 05, 2007 at 02:23 AM Quote Link to comment https://forums.phpfreaks.com/topic/80214-auto_increment-how-do-i-fix-its-next-index/#findComment-406582 Share on other sites More sharing options...
fenway Posted December 5, 2007 Share Posted December 5, 2007 there is no way to have the table's indexes automatically fixed ?! It's not broken, there's nothing to fix -- you had rows there with the UIDs in between, then you deleted them... so what? Leave this number alone, nothing outside the application should ever see it, and you should never be exposing it. Quote Link to comment https://forums.phpfreaks.com/topic/80214-auto_increment-how-do-i-fix-its-next-index/#findComment-406600 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.