Re: Inserting rows with missing IDs

From: Date: Tue, 04 May 2010 15:13:20 +0000
Subject: Re: Inserting rows with missing IDs
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-304892@lists.php.net to get a copy of this message
On 3 May 2010 14:34, Andre Polykanine <andre@oire.org> wrote: > Hello everyone, > It's not a strictly PHP question, however since I use that with PHP, > I'm asking it there. > How can I accomplish the task of inserting rows into MySql database > with missing IDs? Say, I have rows with IDs 1, 2, 3, 5, 9, 12, 17, and > 195. How do I make the check that allows to insert firstly the missing > IDs and only then apply the auto-increment? > Thanks! BTW, I agree with the other posters here. Buggering around with the ID is normally pointless unless you have SO many missing IDs that you are approaching the limit of the value of the column containing the ID. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling

« previous php.general (#304892) next »