Re: autoincrement
| From: | Glenn Holden | Date: | Tue, 02 Apr 2002 04:15:15 +0000 |
| Subject: | Re: autoincrement | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18108@lists.php.net to get a copy of this message | ||
What's the error?
Do you already have an auto-inc field?
Have you tried it with another interface? Ie: directly in the MySQL command
line util.
Glenn
Notes from MySQL.com:
There can be only one AUTO_INCREMENT column per table, and it must be
indexed.
When you add an AUTO_INCREMENT column, column values are filled in with
sequence numbers for you automatically. You can set the first sequence
number by executing SET INSERT_ID=# before ALTER TABLE or using the
AUTO_INCREMENT = # table option. See section 5.5.6 SET Syntax.
With MyISAM tables, if you don't change the AUTO_INCREMENT column, the
sequence number will not be affected. If you drop an AUTO_INCREMENT column
and then add another AUTO_INCREMENT column, the numbers will start from 1
again.
"Daniel Broome" <xake@zealous.net.nz> wrote in message
news:20020402033502.70611.qmail@pb1.pair.com...
> I am trying to add auto increment to a table I have already created in
> phpMyAdmin but I keeps coming up with an error.
> what can I do to fix this?
>
>