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 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. 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"); ?> Link to comment https://forums.phpfreaks.com/topic/67380-table-index-reset/#findComment-338178 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.