Hallo Jason,


my problem is that the mysql 'auto_increment' behaviour
will increase the 'sequence' always to the maxnumber +1.

We now have p.e. a table with customers.
Every new customer will of course get a customer_id.

We now have 2 different id_ranges.
Some customers should get their id range
a) 10000-99999
But some will get their id from range
b) 1000000-9999999

The 'auto_increment' field is no help here.


regards
Gunnar



On Don, 21 Jun 2001, Jason Burfield wrote:

>I'm not sure about a version that old, buy why not just do this:
>
>create table sequence(
>id int unsigned not null auto_increment primary key
>);
>
>Then, just do:
>
>insert into sequence values(null);



>
>That will increment the number each time.
>
>  --  Jason

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to