Re: GUID or any other unique IDs

From: Date: Tue, 25 Oct 2005 13:30:21 +0000
Subject: Re: GUID or any other unique IDs
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-224627@lists.php.net to get a copy of this message
While not ideal, you could do a select on a db. MS SQL and MySQL both have functions to generate unique id's and I imagine the other databases do as well. While running a "SELECT uuid()" and hitting the database for each one of these things is annoying, it is one possible pseudo-solution. On Tue, 25 Oct 2005 06:47:26 -0400, "Denis Gerasimov" <denis.gerasimov@team-force.org> wrote:
Hello Jasper,
$unique_id = sha1( uniqid( mt_rand(), true ) ); which should be very unique and suitable for most purposes.
I really need millions of unique IDs - hashing is not suitable for this task (I think so) :-(. Any more ideas? Is there a PHP extension or an external library for generating GUIDs? Have a great day, Denis S Gerasimov Web Developer Team Force LLC Web: www.team-force.org RU & Int'l: +7 8362-468693
email:    denis.gerasimov@team-force.org
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

« previous php.general (#224627) next »