I having problems getting the following to work correctly. 1) The first query only pulls record IDs of a particular category, in this case category #3. 2) The output query randomizes the records IDs of that category. When I do an output test after this there are a number of records, which proves to me that it works correctly.
3) The second query then matches the randomized ID with an id from the db. No matter what I do, the same record each time comes up when I rerun this routine. Am I missing something? Thanks, Mark <cfquery name="q_test" datasource="dbase"> SELECT t_ID FROM t_testmain WHERE ID_testcat = 3 </cfquery> <cfoutput query="q_test"> <cfset Selecttest = #ListGetAt(t_ID, RandRange(1, ListLen(t_ID)))#> </cfoutput> <cfquery name="DisplayTest" datasource="dbase"> SELECT * FROM t_testmain WHERE t_ID = #Selecttest# </cfquery> <cfoutput>#trim(displaytest.quote)#</cfoutput> ______________________________________________________________________ Why Share? Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

