• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's wrong with mysql reset auto increment in codeigniter?

#7
1. Select all records and store in array or object. Maybe also save them to a JSON file
2. Truncate the table -> This will reset auto increment
3. (Re)Insert the records from step 1 -> remove existing ID column
4. Your ID's have been rearranged Smile
Reply


Messages In This Thread
RE: What's wrong with mysql reset auto increment in codeigniter? - by Martin7483 - 05-19-2017, 04:54 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.