If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Random number/unknown existance

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-06-04, 21:04
subnet_rx subnet_rx is offline
Registered User
 
Join Date: Oct 2004
Posts: 6
Random number/unknown existance

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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On