Re: Is spl_object_hash unique in the SQL sense? Can it be used as a unique SQL db column? [message #178457 is a reply to message #178397] |
Tue, 19 June 2012 10:32 |
Captain Paralytic
Messages: 204 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Jun 13, 12:40 pm, Goran <go...@nospam.com> wrote:
> On 13.6.2012 13:09, Captain Paralytic wrote:
>
>> On Jun 12, 7:47 pm, "ku...@pobox.com" <ku...@pobox.com> wrote:
>>>> No, hashes can never guaranteed to be unique.
>
>>> I opted to use
>
>>> md5(uniqid());
>
>>> to create a unique key.
>
>> Why bother hashing it, why not just use the uniqid() value directly?
>
> uniqid() is not truly unique either:D Only truly unique value is the one
> generated by DB (if we are talking about DB data).
Err I know that! but hashing it actually REDUCES it's uniqueness.
|
|
|