I have the id of records in a table to auto increase and also set as a primary key:
id int DEFAULT '0' NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id),
So when a record entry is made to the database, the id number is increased.. so say I have 5 records, which have ids 1 to 5 and I delete the last 3 so I only have records with ids and data in 1,2 and 3.. the next record that is added will have the id of 6. Why is this? and how can I set the id to decline if a record at the end of the table is deleted, and if a record in the middle of the table is deleted (ie they all slide down an id value)?
Thanks
Clint