Keeping autoincrement ID 2 digits. Possible?
| From: | Andy | Date: | Thu, 28 Feb 2002 11:20:35 +0000 |
| Subject: | Keeping autoincrement ID 2 digits. Possible? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17360@lists.php.net to get a copy of this message | ||
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.
E.g.
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