[thelist] Random, Not the same Random twice
Damien COLA
damiencola at wanadoo.fr
Fri Mar 19 18:24:26 CST 2004
find the fonction in Cold Fusion that allows you to delete a record,
here's a pseudo code :
<CFSET Story1 = #RandRange(1,Stories.recordCount +1)#>
<CFSET Stories.DeleteRecordByValue(Story1) >
<CFSET Story2 = #RandRange(1,Stories.recordCount +1)#>
<CFSET Stories.DeleteRecordByValue(Story2) >
<CFSET Story3 = #RandRange(1,Stories.recordCount +1)#>
each time you select a random value, you delete it from your array
Stories.
-----Original Message-----
And it works great, but I can--and do--get duplicates. I'm searching
for a resource to disallow Story2 and Story3 from getting the same
variable as Story1, but I'm drawing a blank.
Can someone point me in the right direction?
More information about the thelist
mailing list