mysql - Using php mt_rand() function -
am trying use php mt_rand() function produce me unique number used unique identifier row in database. can pick number had picked range 1, 1000000. code follows echo mt_rand(1, 1000000);?> continued help
yes, produce duplicates. it's random, not unique. easiest solution use auto-increment column. if don't want sequential, have couple options. these 2 @ first:
Comments
Post a Comment