Mark wrote:
[EMAIL PROTECTED] wrote:

Hello,

I want to add a random unique ID to a Mysql table.  Collisions
are unlikely but possible so to handle those cases I'd like to
regenerate the random ID until there is no collision and only
then add my row.  Any suggestions for a newbie as to the right
way to go about doing this?

Best,

Craig
.

I suggest looking into a GUID sort of thing, it is all coded for you and it
works just like you want.

If you are running Linux, you can get this using:
   $GUID =  exec("uuidgen");
--

_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to