if this interests you at all, i found this yesterday on the evolt.org
mailing list. the gentleman who has put this very useful code basically
suggested that i could base36 my auto_increment IDs. i will leave this
here for those of you who are intersted:
Hi,
My opinion:
You can't use auto_increment in this way.For sure you must do some functions
in php to check flexibility conditions of the digits which are using for new
ID of entire row.The ID field from your table must be CHAR().
E.g:
You need 3 variables;
set @a:=;--initialize
IMHO you can INCREMENT only numbers . :) .
Why only three numbers ?
Anyway i'd see a solution like this :
table :
idfield [1..n]
Select (@max_number:=max(id)) from table;
Insert into table(id,field1,fieldn) values (@max+0.1,'xxx','xxx');
that's kindof solution .
- Original Message
* Erick Papadakis
i need to set up an auto_increment field inside mysql. for various
reasons, the maximum size is 3.
Could you say something about these reasons...?
but i don't want this to be ONLY integers
because that limits me until 999 numbers only.
Well... using three _bytes_, the