12-17-2008, 01:51 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Sep 2008
Posts: 39
Thanks: 9
|
Unique random number?
I have a site for my company that requires a report number. This report number is the id for a specific report, so must be unique. At first I assumed that just a randomly generated number would work, but didn't think the site would get as many reports as it is. So now I need to set it so the random number is unique. How can I do this? My first thought is to query the db to see if the number exist then somehow get a new number if it does exist, but that seems like the wrong way to me. Can someone help me?
__________________
Trying to learn all I can about PHP. Teach me what you know...
|
|
|
|