Don't how much randomness you need it to be..try this

<cfquery name="test" datasource="#application.dsn#">
select field1,field2 from tableName order by whatever
</cfquery>

<cfset startAtRandomPoint=RandRange(1,test.RecordCount)>

<cfloop query="test" startrow="#startAtRandomPoint#" endrow="#test.Re
cordCount#">
 <cfoutput>#field1# #field2#<br></cfoutput>
</cfloop>

<cfloop query="test" startrow="1" endrow="#evaluate(startAtRandomPoin
t-1)#">
  <cfoutput>#field1# #field2#<br></cfoutput>
</cfloop> 


and if you throw in the order by clause dynamically, you ll increase the 
statisical combinations.

Nick Han

>>> [EMAIL PROTECTED] 01/03/02 01:13PM >>>
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