[thelist] mysql primary key question..
Erick Papadakis
erick_papadakis at yahoo.com
Mon Jul 8 03:33:01 CDT 2002
hello,
i hope some database guru can help me with this!
i need to set up an auto_increment field inside mysql. for various
reasons, the maximum size is 3. but i don't want this to be ONLY integers
because that limits me until 999 numbers only. since i have all
flexibility for these three digits or letters, i want to include numbers
and some characters into it as well. e.g.,
m78
23a
1pt
1~8
!76
etc. can all be valid keys for me.
how can i generate such numbers on the fly? if not inside mysql, then
inside php? AND...be sure that the "key" so generated has not been used
before as an id field in my data?
any ideas would be very welcome!
=====
thanks/erick
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
More information about the thelist
mailing list