Thanks Charlie and Mark.

I'm basically trying to insert a random image for each record returned by my
query. So for example:

img1.gif - Headline1 - Mar. 28/2002.<br>
img2.gif - Headline2 - Mar. 27/2002.<br>
img3.gif - Headline3 - Mar. 26/2002.<br>

Perhaps I'll need to do something with JS?

Karl

> From: "Marc Campeau" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Thu, 28 Mar 2002 12:40:54 -0500
> To: <[EMAIL PROTECTED]>
> Subject: RE: [CFTALKTor] RandRange question - Unique random numbers
> 
> You could store randRange results in a list and do something like
> 
> while ( listFind( randRangeResultList, n ) ) {
> n = RandRange( 1, myquery.RecordCount );
> }
> 
> That in worst case could slow down your app though.
> 
> A little more insight into what you want to achieve might help us provide
> you with more help.
> 
> Marc
> 
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
>> Behalf Of Karl Zarudny
>> Sent: Thursday, March 28, 2002 11:12 AM
>> To: CFUG
>> Subject: [CFTALKTor] RandRange question - Unique random numbers
>> 
>> 
>> Hi everybody.
>> 
>> I'm using RandRange to generate random numbers within a cfoutput.
>> How can I
>> ensure that there is no repetition? Here's what I'm doing:
>> 
>> <cfoutput query="myquery">
>> <cfset n = #RandRange(1,myquery.RecordCount)#>
>> <img src="img#n#.gif" alt="Image #n#">
>> </cfoutput>
>> 
>> Should I be using something else instead?
>> 
>> Thanks,
>> Karl
>> 
>> -
>> You are subscribed to the CFUGToronto CFTALK ListSRV.
>> This message has been posted by: Karl Zarudny <[EMAIL PROTECTED]>
>> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
>> Manager: Kevin Towes ([EMAIL PROTECTED])
>> http://www.CFUGToronto.org/
>> This System has been donated by Infopreneur, Inc.
>> (http://www.infopreneur.net)
>> 
>> 
> 
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: "Marc Campeau" <[EMAIL PROTECTED]>
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: Karl Zarudny <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

Reply via email to