jenniferG Posted August 31, 2007 Share Posted August 31, 2007 We have an auto-incrementing index field in a table we ujse for development. when we deploy, we would like to remove rows and reset the auto-increment field so the first row our clients insert will have the auto-increment value equal to 1; Thanks, Natalie Quote Link to comment https://forums.phpfreaks.com/topic/67380-table-index-reset/ Share on other sites More sharing options...
KrisNz Posted August 31, 2007 Share Posted August 31, 2007 TRUNCATE does just that. Quote Link to comment https://forums.phpfreaks.com/topic/67380-table-index-reset/#findComment-338172 Share on other sites More sharing options...
pocobueno1388 Posted August 31, 2007 Share Posted August 31, 2007 Just to build on the previous post: <?php mysql_query("TRUNCATE table table_name"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/67380-table-index-reset/#findComment-338178 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.