Could anyone tell me a good way to get a random ID number, when the numbers are unknown? The ID automatically added to the database is just based on the last number entered, but items could be deleted, so in a series of 1-20; 10, 13, and 8 may not even be there.

So basically, is there a way to generate a random number based on the number of items (retrieved at runtime), then check if the record exists before continuing in mySQL?