Why not use the query.recordcount to define your random number range and
display using startrow=#randomRecord# and maxrows=1 attributes? 
This way you could cache the query or assign it to the application or server
scope and work with it out of memory... Just a thought.

Jeff Garza
Lead Developer/Webmaster
Spectrum Astro, Inc.
480.892.8200
[EMAIL PROTECTED]
http://www.spectrumastro.com



-----Original Message-----
From: David Baskin [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 04, 2001 1:08 PM
To: CF-Talk
Subject: Random Quotes & SQL


Hello, i've been tasked with creating a random quote app for a web site. The
trouble i'm having is figuring out how to store the data in my table and
then be able to retrieve data once the client has deleted a quote. For
example, i can use a PK to define each quote and then just pull a random
number within the range of quotes available (eg. 45 quotes, so a random
number between 1 and 45), but the client wants to be able to modify or
delete quotes so once a deletion occurs, it's possible that the random
number chosen might just not exist. What is the SOP for something like this?
If the record doesn't exist, select a different random number (seems like a
lot of overhead) or is there a way that i should be keying the data to make
the possibility of pulling an id that doesn't exist. Oh, i'm working with
Access too. Thanks for any help.

d
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to