x = total available records
<cfset RandomCount = #RandRange(1,x)#>
<cfquery>
SELECT * FROM TABLE WHERE ID = Random Count
</cfquery>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 05, 2000 4:49 PM
To: CF-Talk
Subject: Random Record
How could i select a random record from a table?
Like to set my query as
<cfquery datasource="mine" name="selectrandomrecord">
SELECT *
FROM Table
WHERE RecordID = ??????
<cfquery>
Anyone know how to do this?
thanks
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.