Off the top of my head, you might seed the random generator and then do
something like this:

<cfquery name="playing" datasource="#datasource#">
select name, address, phone
from addresses
where state = 'NY'
</cfquery>

<cfset shownlist = "">
<cfoutput>
   <cfloop condition="#ListLen(shownList)# LTE #playing.recordcount#">
      <cfset show=RandRange(1, playing.RecordCount)>
      <cfif NOT ListFind(shownlist, show)>
         #playing.name[show]#<br>
         #playing.address[show]#<br>
         #playing.phone[show]#<br>
         <hr>
         <cfset showlist = listappend(showlist, show)>
      </cfif>
   </cfloop>
</cfoutput>

Now I didn't check any syntaxes on this but you get the gist of the
suggestion.  Good luck!

Hatton


> -----Original Message-----
> From: Kris Pilles [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 03, 2002 4:13 PM
> To: CF-Talk
> Subject: Randomizing cfoutput?
>
>
> Anyone know how to randomize the query resutls that cfoutput produces?
>
> 
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to