Thanks Bert. But another question!
What happens if the random number try's to display a record that has been
previously deleted?
David
-----Original Message-----
From: Bert Dawson [mailto:[EMAIL PROTECTED]]
Sent: 12 December 2000 10:57 AM
To: Fusebox
Subject: RE: Random record?
this should work (i think):
<CFOUTPUT>
#myQuery.myColumn[RandRange(1,myQuery.recordcount)]#
</CFOUTPUT>
Bert
> -----Original Message-----
> From: David Crowther [mailto:[EMAIL PROTECTED]]
> Sent: 12 December 2000 10:51
> To: Fusebox
> Subject: Random record?
>
>
> Does anyone know of a quick and easy way of requesting a
> random record from
> a table.
>
> For example: A query that selects a random record from a
> field (say UserID)
> from a table (say tblUser). So when each time the page is
> viewed, a new
> record is displayed.
>
> All help very much appreciated!
>
> David
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists