Re: [PHP] Re: Unique ID on 5.0.4 (Windows)

2005-09-22 Thread Jasper Bryant-Greene
Chris wrote: Jasper Bryant-Greene wrote: $unique_id = sha1( uniqid( mt_rand(), true ) ); That unique ID will be based on the current time in microseconds prefixed by a random number generated by the Mersenne Twister. That is *extremely* unlikely to duplicate, even at the same microsecond.

Re: [PHP] Re: Unique ID on 5.0.4 (Windows)

2005-09-22 Thread Chris
Jasper Bryant-Greene wrote: Chris wrote: David Robley wrote: Chris wrote: Pretty soon I'm going to be needing to generate a unique identifier in a script. I'm looking into how to go about doing it now. Have you looked at uniqid() ? http://php.net/uniqid If two requests generate and

Re: [PHP] Re: Unique ID on 5.0.4 (Windows)

2005-09-21 Thread Jasper Bryant-Greene
Chris wrote: David Robley wrote: Chris wrote: Pretty soon I'm going to be needing to generate a unique identifier in a script. I'm looking into how to go about doing it now. Have you looked at uniqid() ? http://php.net/uniqid If two requests generate and ID at the same microsecond then t

Re: [PHP] Re: Unique ID on 5.0.4 (Windows)

2005-09-21 Thread Chris
David Robley wrote: Chris wrote: Hi, Pretty soon I'm going to be needing to generate a unique identifier in a script. I'm looking into how to go about doing it now. It has to work on Apache 2 / PHP 5.0.4 (Module) / Windows 2000 Server. Any suggestions on how I might be able to do it? I'

[PHP] Re: Unique ID on 5.0.4 (Windows)

2005-09-21 Thread David Robley
Chris wrote: > Hi, > > Pretty soon I'm going to be needing to generate a unique identifier in a > script. I'm looking into how to go about doing it now. > > It has to work on Apache 2 / PHP 5.0.4 (Module) / Windows 2000 Server. > > Any suggestions on how I might be able to do it? > > I've noti

[PHP] Re: unique ID

2002-04-11 Thread Julio Nobrega Trabalhando
Make an autoincrement/primary column? Or keep a number stored and increase it one by one and using when derirable? I prefer the first one :-) -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/w