sleepyw Posted February 10, 2010 Share Posted February 10, 2010 One of the fields in my db assigns a unique number to every entry via auto-increment (for new items added). Right now, we're at about 5500. So a new item added would be 5501. However, due to a problem I was trying to troubleshoot, I changed one of the key numbers to 9999 temporarily. After testing, I changed it back to its original number. However since then, new items added to the db started with 10000 and continued from there, even though I've renumbered the items. Is there a way to fix this? EDIT: Solved using this method: ALTER TABLE 'tablename' AUTO_INCREMENT=5501 Link to comment https://forums.phpfreaks.com/topic/191670-problem-with-auto-increment-after-manually-changing-a-number-in-that-field/ Share on other sites More sharing options...
sader Posted February 10, 2010 Share Posted February 10, 2010 try this query if not tried yet "ALTER TABLE table_name AUTO_INCREMENT = number" Link to comment https://forums.phpfreaks.com/topic/191670-problem-with-auto-increment-after-manually-changing-a-number-in-that-field/#findComment-1010322 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.