Re: Auto Increment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux