Re: [PHP] Unique ID - again

2004-02-12 Thread Galen
MySQL (or another SQL database) is the answer. You can check for an existing OR use it's auto_increment or whatever else you like. Create a field to track all this stuff. There is no other way to guarantee that an ID is unique than to check it against existing. "Random" functions yield random r

Re: [PHP] Unique ID - again

2004-02-12 Thread Richard Davey
Hello Alex, Thursday, February 12, 2004, 11:00:41 AM, you wrote: A> I'm using usual md5(microtime()); to create IDs, but now I've encountered a A> problem with that. I need to create explicitly 6 digit unique A> number(decimal). Yes, I know I can use for/while loop to fill a string with A> digits

[PHP] Unique ID - again

2004-02-12 Thread Alex
Hi folks, I'm using usual md5(microtime()); to create IDs, but now I've encountered a problem with that. I need to create explicitly 6 digit unique number(decimal). Yes, I know I can use for/while loop to fill a string with digits, but is it ABSOLUTELY sure that the random will never return same nu