php-db | 2004071
Date: 07/13/04
- Next message: H. J. Wils: "[PHP-DB] endless loop / running as a service?"
- Previous message: Jason Wong: "Re: [PHP-DB] mysql auto increment"
- In reply to: Michael Gale: "[PHP-DB] mysql auto increment"
- Next in thread: Peter Westergaard: "Re: [PHP-DB] mysql auto increment"
- Reply: Peter Westergaard: "Re: [PHP-DB] mysql auto increment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I just had a bit of a play with it and discovered you can do this:
say your auto-increment index is named 'fred' for arguments sake.
INSERT INTO table SET FRED = 1000
This will just create a record where the auto-index fred will equal 1000.
Next auto-increment, NOT specifying a value for 'fred', will be 1001.
No idea if there are any dangerous side-effects. Perhaps others will know?
At 09:19 AM 13/07/2004, you wrote:
>Hello,
>
> I know this is more of a mysql question then php with mysql but I
> can not find the answer. I have a primary key in a
>table the is setup and working with auto increment.
>
>Now I want to change it so it will start auto incrementing from 1000. So
>each entry will be:
>
>1001, then 1002, ....
>
>
>--
>Michael Gale
>Network Administrator
>Utilitran Corporation
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
.
. Ross Honniball. JCU Bookshop Cairns, Qld, Australia.
.
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: H. J. Wils: "[PHP-DB] endless loop / running as a service?"
- Previous message: Jason Wong: "Re: [PHP-DB] mysql auto increment"
- In reply to: Michael Gale: "[PHP-DB] mysql auto increment"
- Next in thread: Peter Westergaard: "Re: [PHP-DB] mysql auto increment"
- Reply: Peter Westergaard: "Re: [PHP-DB] mysql auto increment"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

