Re: Auto Increment
| From: | Mark Nenadov | Date: | Mon, 07 Oct 2002 22:10:16 +0000 |
| Subject: | Re: Auto Increment | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22263@lists.php.net to get a copy of this message | ||
On October 8, 2002 01:49 am, Gavin Nouwens wrote:
> Hi peoples,
>
> Just wondering if it's possible with mysql to start an auto-increment field
> at a specified number instead of 0001?
>
> I could always just code it in php to add another number onto it to get it
> to the right start point, but leaves areas for human error to creep in!
>
> Any help would be appreciated!
>
> -gav.
Gavin,
One way to approach this is to manual insert one record with the number you
want.
So, just add a dummy field with an id of "49" for example.. Then the next
record you insert will be "50".
--
Mark Nenadov,
Freelance Software Developer
web: www.freelance-developer.com
e-mail mark@freelance-developer.com