Hi, I have entered data into tables in phpMyAdmin. Then, I removed a couple of rows. Later, when I re-entered more data into the table it stuffed up the auto-incrementing. I think it may have something to do with the 'Next Autoindex' it didn't refresh when I deleted the rows. Does anyone know how to rectify this in phpMyAdmin?
The next index won't change when you delete rows, only when you add a new one. Keys aren't reused when you delete rows, is that what you were expecting?
Initially I added rows and it incremented fine.... But then I deleted rows later on.... Then, when I tried to insert them another time all the incrementing was muddled up because it's counting from the last ones that were entered.
to reset auto_increment to a given value use ALTER like this: ALTER TABLE table_name auto_increment=value;