Dave,
If i understand.. your question right... this is quite simple.

<cfset i=randRange(1,queryName.recordCount)>

<cfoutput>
#queryName.FieldName[i]#
</cfoutput>

The above will give you random records...one at a time. if you want all
the records to be random each time.. you might want to put indexes in an
array.. and re-arrange them and just use array notation([]) to pull the
record.


Joe

> -----Original Message-----
> From: David Jones [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 21, 2002 4:25 PM
> To: CF-Talk
> Subject: Randomization of a cfquery
>
>
> Does anyone have a custom tag that will take a regular query and randomize
> the results? I don't have to have a custom tag a database
> solution would do
> as well. Anything would help at this point. This seems like a simply thing
> to do.  I am using Oracle for my backend so if anyone knows of a way to do
> it there that would be great too.
>
> Thanks in advance,
>
> Dave
>
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to