RE: [PHP-DB] mySQL Autoincrement Field

From: Date: Fri, 03 Aug 2001 03:27:27 +0000
Subject: RE: [PHP-DB] mySQL Autoincrement Field
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11018@lists.php.net to get a copy of this message
Hi Ralph, Here is how I do it, which is how you suggested. Regards, Chris... #-------------------------------------------------- CREATE TABLE test ( id int(11) NOT NULL auto_increment, browser varchar(255) NOT NULL default '', PRIMARY KEY (id) ); INSERT INTO test VALUES (10000,'Start'); INSERT INTO test VALUES (10001,' Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; CLS4)'); #----------------------------------------------------- # results # id browser # 10000 Start # 10001 Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; CLS4) -----Original Message----- From: Ralph Guzman [mailto:raguzman@netraiser.com] Sent: Friday, August 03, 2001 1:01 PM To: PHP General Mailing List Cc: PHP DB Mailing List Subject: [PHP-DB] mySQL Autoincrement Field In mySQL, how do I set an auto increment field to start at a certain number-let's say 10000? Do I just insert the first record with the desired number I wish to start with? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#11018) next »