Re: Hash function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 2:38 PM +0330 11/9/09, Ali Asghar Toraby Parizy wrote:
hi friends
I need a hash function to build a Unique serial number ...

Try:

http://php.net/manual/en/function.dbplus-getunique.php

But use at your own risk.

If you want a unique number try using a time stamp (i.e., time() ) in concert with a database.

For example, grab a time, look for it in a database, if it's not there then use it. If it is there then repeat until you have that isn't. That way it's a unique number guaranteed.

Cheers,

tedd

Addition to that.

When you find an unique number, use it AND store that in the database.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux