how can i input php in mysql without repeat? -


this question exact duplicate of:

i want add random number created php sql without repeat. use code create 14 length random:

for ($i=0;$i<10;$i++) {         $n1 = rand(100000,999999);         $n2 = rand(100000,999999);          $pincode = (string)$n1.(string)$n2;     echo $pincode;     echo nl2br("$pincode\n"); 

now want input created number in sql , ignore repeated number. how can ?

the best way use timestamp. shall unique , no chance of duplicacy.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -