This is my first time posting to this list, so please forgive me if I am not doing this correctly. I will break this into post into two parts: what i want to know and why. Is there a way to get auto_increment fields to fill in gaps in the numbering sequence if some records have been deleted?
Here is an example of my problem: I have two tables in MySQL: 1.web_hits: date datetime not null, client mediumint unsigned not null, URL varchar(500) not null 2.clients: idx mediumint unsigned not null unique auto_increment, name varchar(255) not null "web_hits" holds information about web traffic on our network. There are more fields that what i have listed, but this is all that is needed for this example. It records the time of the web hit, the URL, and the ID of person who made the hit. The ID can be looked up in the "clients" table. Now, after a while the web_hits table starts to get really big, because of this we start deleting the old entries from the web_hits table based on the date field. Because of this deletion some clients in the clients table may not be used any more. So we have a query that will delete those from the clients table as well. Now, because of this deletion, there are sequence gaps in the "idx" field. We would like to be able to use those numbers again for incoming clients...Is this possible? Thank you, Jeff _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php