how can i input php in mysql without repeat? -
this question exact duplicate of:
- input php in mysql without repeat? 1 answer
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
Post a Comment