Welcome Guest, Not a member yet? Register   Sign In
What's wrong with mysql reset auto increment in codeigniter?
#6

(05-18-2017, 01:31 AM)InsiteFX Wrote: ALTER TABLE tablename AUTO_INCREMENT = 1

There is a very easy way with phpmyadmin under the ( operations tab ),
you can set, in the table options, autoincrement to the number you want.

I think OP does want to do this, but also wants to renumber all of the old records, probably to remove missing ids that were deleted? If it were me, I'd probably just rename the table, recreate the original table, and then batch insert everything. Maybe there is an easier way.
Reply


Messages In This Thread
RE: What's wrong with mysql reset auto increment in codeigniter? - by skunkbad - 05-18-2017, 07:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB