SQL-query

From: Date: Fri, 17 Jan 2003 11:13:35 +0000
Subject: SQL-query
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-17933@lists.php.net to get a copy of this message
I hope this isn't to much OT... Sorry if it is... In my MySQL-db that I use for a php-driven site I have many tables with the Primary Key set as an auto increment value. If I have 4 records with id 1, 2, 3 and 4 and then delete number 3 and add one more record I get the id's 1,2,4 and 5. It isn't much of a problem, but it would be nice to check for the first "hole" in the id's and insert the record there instead. How would you do this? is there some simple way from either MySQl or PHP that doesn't take to much time to execute? thanks in advance . bobo . www.elstudion.com . dev@elstudion.com .

« previous php.windows (#17933) next »