Unique text field in MySQL and php
Posted
by Jonathan
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan
Published on 2010-04-07T16:50:36Z
Indexed on
2010/04/07
16:53 UTC
Read the original article
Hit count: 194
I've created a salt using; md5(rand(0,10000000)); (there is probably a better way?)
There doesn't seem to be possible to make a text field unique in MYSQL. So how do I check if the salt has already been used for a previous user?
Or should I generate the salt based on the current date/time? as it is impossible for 2 users to register at exactly the same time correct?
© Stack Overflow or respective owner