If that's the case just do this:
<cfquery name="selectrandomrecord" datasource="MINE">
SELECT *
FROM QUOTES
</cfquery>
<cfset RandNum = #RandRange(1,selectrandomrecord.RecordCount)#>
<CFLOOP QUERY="selectrandomrecord">
<CFIF CurrentRow EQ #RandNum#>
<CFOUTPUT>
Random Record No = #selectrandomrecord.ID#<BR>
Quote = #selectrandomrecord.Quote#<BR>
Author = #selectrandomrecord.Author#
</cfoutput>
</cfif>
</cfloop>
Larry Juncker
Senior Cold Fusion Programmer
Heartland Communications Group, Inc.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 05, 2000 10:52 PM
To: CF-Talk
Subject: Re: Random Record
well what i want to be able to do is like show a random quote from a table
of quotes....
Now some may be deleted, some may be added, in which the
<cfset Random = #RandRange(1, table.RecordCount)#>
would not work because the "ID" numbers in the table would be changing, is
there a way to specify like a certain Row number in my SQL WHERE statement?
like...
<cfquery datasource="ds" name="random">
SELECT *
FROM Quotes
WHERE ***TableRow = Random Row***
</cfquery>
can that type of function be completed???
kev
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.