Re: Auto Increment
| From: | Owen Prime | Date: | Tue, 08 Oct 2002 02:08:50 +0000 |
| Subject: | Re: Auto Increment | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22264@lists.php.net to get a copy of this message | ||
BTW... you only need to do it once. Subsequent INSERTS will follow on from
the previous insert.
Owen Prime wrote:
> 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.