otuatail Posted July 20, 2006 Share Posted July 20, 2006 I am using PHP myAdmin and MySQL. Please can anyone tell me how to change the value of the next autoindexDesmond. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 20, 2006 Share Posted July 20, 2006 How do you mean change the next autoindex? It should increment one more by itself. Or do you want it to start auto increment from a certain number, like 100, so the next one will be 101, after that 102 etc? Quote Link to comment Share on other sites More sharing options...
otuatail Posted July 20, 2006 Author Share Posted July 20, 2006 Correct I have deleted a lot of rows and would like to wind back the counter Desmond. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 20, 2006 Share Posted July 20, 2006 I wouldnt recommend you do this as this not how auto_increment works each auto generated number should be unquie, meaning you cannot have two rows with the same id or an id that has been previously been used, however if it was to fast forward the counter then yes.However if you want to do this, then you'll want to run the following query through phpMyAdmin:[code]ALTER TABLE tbl_name AUTO_INCREMENT = x;[/code]Change tbl_name with the actuall table you want to change the counter and x with the number you want to the counter to start at. Quote Link to comment Share on other sites More sharing options...
otuatail Posted July 20, 2006 Author Share Posted July 20, 2006 Thanks for that. I wouldn't have gone overboard and ftried to duplicate the ID. Thanks that worked a treat.Desmond. Quote Link to comment Share on other sites More sharing options...
cmgmyr Posted July 20, 2006 Share Posted July 20, 2006 you can also go to "Operations" in phpMyAdmin Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 20, 2006 Share Posted July 20, 2006 cmgmyr, Interesting I've never looked at that option. It has a lot of features that'll be useful to me, especially correcting spelling errors with database/table names. I'll grace you :) Quote Link to comment Share on other sites More sharing options...
cmgmyr Posted July 20, 2006 Share Posted July 20, 2006 Thank you for that! I like phpMyAdmin it is a great tool to have and use. It saves soooo much time! 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.