All, I'm doing a query and randomly displaying images from within each record but records have been removed so I don't have sequential id values.
PROBLEM: When I run this code sometime I get images, sometimes I get nothing. Should I be running a different random'izer? 8-) Any ideas? CODE: <!--- GET 2ND VALUE TO BE PASSED TO RANDRANGE ---> <CFQUERY name="get_vids_a" datasource="#datasource#" maxrows="1"> select * from vidweek order by vidwee_id desc </CFQUERY> <!--- GET 1ST VALUE TO BE PASSED TO RANDRANGE ---> <CFQUERY name="get_vids_b" datasource="#datasource#" maxrows="1"> select * from vidweek order by vidwee_id asc </CFQUERY> <cfset VAL_ID = #RandRange(get_vids_b.vidwee_id, get_vids_a.vidwee_id, "SHA1PRNG")#> <!--- USE THAT ID VALUE TO SET IMAGE NAME ---> <CFQUERY name="get_vids2" datasource="#datasource#"> select vow_up_lgnail_file,vidwee_id,vow_title from vidweek where vidwee_id = #VAL_ID# </CFQUERY> <CFSET lgthbimg = "#get_vids2.vow_up_lgnail_file#"> <img src="VideoOfTheWeek/home/<cfoutput>#lgthbimg#</cfoutput>" width="262" height="231" border="0"> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250744 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4