Not within the construct of auto_increment.  You could , however write your
own Serial Assigned Key (SAK) routine in PHP to enforce these business
* Cal Evans
* Journeyman Programmer
* Techno-Mage

-----Original Message-----
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 5:21 AM
Subject: [PHP-DB] Keeping autoincrement ID 2 digits. Possible?

Hi there,

I am wondering if it would be possible to have a autoincrement field which
is only 2 digits long. The idea is, that as soon as 99 is reached the next
value will be a free one withing 0-99.


A forum has not more than 99 different forums. So lets say we will keep the
ID 2 digits.
Forums can be deleted and created by the admin. As soon as one is deleted,
there is an empty number. E.g. 5
So we reach 99 and the next number should be not 100 but 5!

I did set the type of the field to int(2), but it does not change anything.
Still 100.

Has anybody a good idea?

Thanx Andy

PS: if somebody is wondering why 2 digits... I am passing this value like
that : viewforum/01.html

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to