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
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
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
3 matches
Mail list logo