Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

PHP - Autoincrement alphanumeric from 0

$
0
0

Hello,

 

I'm in trouble with alphanumeric autoincrement. I have a database wich I need an ID ( the autoincremented one ). It will have many rows, so I'd like to have the smallest ID possible.

 

For example, normally, using only numbers from 0 to 10000000 this ID will be very long. If the ID could have letters, it could be something like 3AcB2 .

 

For example what I'd like to:

 

1

2

3

4

....

99

1a

1A

1b

1B

....

999

9aa

9AA

9aA

9Aa

 

and so on...

Could someone help me generate me such ID's being last in dabase + 1 ?

Thanks in advance.


Viewing all articles
Browse latest Browse all 13200

Trending Articles