But what would be even more elegant is the random choice to happen in the
SQL layer. Anyone have a DBA handy? The only way I can figure is to have
another column in your table with a count of the nuber of time the row has
been used, which gets updated when it DOES get used, and the select gets the
row with the lowest viewcount. It would be nice to be in a stored proc. This
would eliminate the entire recordset coming across ODBC to CF where CF only
wants one row. If you only have 100 rows in the table, then it's no biggee,
but if you have 10,000....
Nat Papovich
Webthugs Consulting
ICQ 32676414
"People don't know the bandwidth of a FedEx truck full of diskettes."
-William Gibson
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 12, 2000 6:36 AM
> To: Fusebox
> Subject: Re: Random record?
>
>
> Please disregard my last note. Bert's solution is way more elegant.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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