FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Is spl_object_hash unique in the SQL sense? Can it be used as a unique SQL db column?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Is spl_object_hash unique in the SQL sense? Can it be used as a unique SQL db column? [message #178397 is a reply to message #178396] Wed, 13 June 2012 11:40 Go to previous messageGo to previous message
Goran is currently offline  Goran
Messages: 38
Registered: January 2011
Karma:
Member
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).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Best practice, (secure), to save session data?
Next Topic: runkit
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 09:35:50 GMT 2024

Total time taken to generate the page: 0.03864 seconds