|
-
Aug 14th, 2006, 08:29 PM
#6
Re: [2005] how to select Random Row each time , Very Challenging
I would think that this would be pretty easy. Give your records sequential IDs, get the number of records, generate a random number in the range of the IDs, get the record with that ID. If you want to have the tips grouped into sections than have a two-column primary key. Have a section ID and a tip ID. Get the number of sections and the number of tips in each section, generate a random number in the range of the section IDs, generate a random number in the range of the tip IDs for that section, get the record with those IDs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|