Unique ID - again

From: Date: Thu, 12 Feb 2004 11:00:41 +0000
Subject: Unique ID - again
Groups: php.general 
Request: Send a blank email to php-general+get-177495@lists.php.net to get a copy of this message
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 number when seed is microtime()? It is very important as the number will identify a bank transfer... Is there any other way than checking with all previous IDs? Or some MySQL function to do this for me? thank you Alex

« previous php.general (#177495) next »