>From memory, so the syntax might be a touch off...
<cfset temp=Randomize(Seconds(Now()) * Minutes(Now()))>
<cfset ShowRow = RandRange(1, qGetAds.Recordcount)>
<cfoutput query="qGetAds" StartRow=ShowRow MaxRows=1>
...
</cfoutput>
C. Hatton Humphrey
> -----Original Message-----
> From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 13, 2002 2:31 PM
> To: CF-Talk
> Subject: Random row from SQL
>
>
> A while back someone posted some code to generate a random number between
> two numbers using SQL. I'd like to be able to do that. I want to be able
> to return a random row from among rows in an ad database. Does
> anyone have
> ideas on how this might be accomplished?
>
> Mark
>
______________________________________________________________________
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=coldfusiona
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