I am trying to randomly select and display 20 records from a table. Currently, my code looks something like this (simplified):
<!--Titles is a query containing all possible records to choose from-->
<cfloop index="counter" from="1" to="20">
<cfset CurrentRecord = RandRange(1, Titles.RecordCount)>
<!--Display data, using Titles.Whatever[CurrentRecord]-->
The problem is that I want a simple way to pick 20 random records, but make sure that I dont pick the same record twice in any one run of the script. I DON'T want to have to add the ID of each to an array and have to recursively search the array for the ID to see if it is already there.