Re: Auto Increment
| From: | Owen Prime | Date: | Tue, 08 Oct 2002 02:03:09 +0000 |
| Subject: | Re: Auto Increment | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22262@lists.php.net to get a copy of this message | ||
Gavin,
You can specify the next auto_increment id by using
SET INSERT_ID = #;
Where # is your desired number. Will only work for the next INSERT/ALTER.
Have a look down the bottom of 7.33 in the MySQL language reference.
Cheers,
Owen
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.