Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
04-25-2013, 07:35 PM #1
- Join Date
- Apr 2013
- Thanked 0 Times in 0 Posts
remove id index number from database in php
HY to every one!
i attach a picture of my database..
the problem is that when i remove a record from database and insert new one then it will start with next index..
for example if i refome a record placed in location 1 then insert new one, the id of the new one is not 1, it take id number 2.. why?
can any have any idea?
04-25-2013, 09:56 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,662 Times in 2,631 Posts
This isn't a PHP issue, its a mysql one.
And the answer is simple: you don't do a thing. It is rarely a wise idea to do any type of autonumber reindexing. Since surrogates contain no actual meaning as a primary key directly related to the record itself (hence the reason why it is surrogate), it doesn't matter what the value is. Simply ignore it and move along.
Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)PHP Code:
header('HTTP/1.1 420 Enhance Your Calm');