Re: MySQL AUTO INCREMENT feature

From: Date: Thu, 14 Dec 2000 23:48:38 +0000
Subject: Re: MySQL AUTO INCREMENT feature
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30398@lists.php.net to get a copy of this message
Scott, What's your table type? If it's MYISAM the autoincrement values are preserved, otherwise they get re-evaluated. I discovered this when my foreign keys began to behave strangely - uh, disappeared or returned very strange results! Do a couple of tests from the command line. Cheers - MIles Thompson Scott Mebberson wrote: > Hi Guys, > > I am using the AUTO INCREMENT attribute on one of my cols. I need to know > how I can clean this up. For example, just say I have rows with the > elementID's of 1, 2, 3, 4, 5, 6, 7, 8 and then I delete 3, 6 and 7. > > Is there some command I can call using PHP that will re-eval the elementID > col to reorder them so it became 1, 2, 3, 4, 5 > > Thanks > > Scott. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#30398) next »