"About MD5 is enough" 50,000 data, MD5 began to appear duplicates! Doubts
database table pre_post, field ID auto increment, primary key. Field MD5 unique.
The value of the Start field MD5 is $MD 5=md5 (Time (). $ip);
It was later changed to only $MD 5=md5 (Time ()), and then every thousands of writes would appear MD5 duplicates, #1062:
#1062-duplicate entry ' dbecd780b5f02c35f236ac0f4766c634 ' for key ' MD5 '
The original MD5 generated, $IP client IP for the guest
$MD 5 = MD5 (Time (). $ip);
Now the MD5 is generated, only according to the current timestamp
$MD 5 = MD5 (time ());
One question: The first time period of encryption is from The Times (). $ip, the second time () is modified. As a result, there is no possibility of duplication, and the resulting MD5 will not be duplicated. But the second generation of MD5 is the same as the MD5 generated in the first phase, and repeats several times every few 1000 times. Very confused
------Solution--------------------
Microtime ()