Re: auto_increment

From: Date: Mon, 27 Dec 2004 01:47:37 +0000
Subject: Re: auto_increment
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-37863@lists.php.net to get a copy of this message
I have the auto_increment on one of my variables. During the past few days I have been doing testing on a "live" database and created several test records which I now have deleted from my table. Is there any way of setting the auto_increment value to match the last "correct" number? Ron
You don't say what database application you're using, but if it's MySQL, you can change the auto increment value using: ALTER TABLE tablename AUTO_INCREMENT = 1 That being said, you actually don't have to do this (and often shouldn't, really). Having gaps in your auto increment sequence shouldn't be a problem. Larry

« previous php.db (#37863) next »