Xtremer360 Posted April 1, 2010 Share Posted April 1, 2010 I use phpmyadmin with my mysql database on my server and would like to know how do I reset the auto increment from the last increment number because I had to delete a hole bunch of rows and instead of having 1,2,3,18,19. I could have 1,2,3,4,5 for the next inserted rows and no I"m not manually inserted data its all with queries from a script. Quote Link to comment Share on other sites More sharing options...
GetPutDelete Posted April 1, 2010 Share Posted April 1, 2010 Click "Empty" and it will clear the table and also reset the increment. Quote Link to comment Share on other sites More sharing options...
Xtremer360 Posted April 1, 2010 Author Share Posted April 1, 2010 I don't want to delete the data in it. I just have manually deleted some rows and when I have my php script insert rows I want it to continue on from the last inserted row. Quote Link to comment Share on other sites More sharing options...
GetPutDelete Posted April 1, 2010 Share Posted April 1, 2010 As far as I know that's not possible with phpMA alone. Now if you were writing a script to assign AI values then that would be different... Sorry dude, hope someone else has heard of a way. Quote Link to comment Share on other sites More sharing options...
Rustywolf Posted April 1, 2010 Share Posted April 1, 2010 i think ALTER table AUTO_INCREMENT = 1 Quote Link to comment 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.