The query you get from cfdirectory is an array (or rather, its columns are):

<cfset randomFilename =
yourCFFileQuery["name"][randRange(1,yourCFFileQuery.recordCount)]>

On Wed, Jul 23, 2008 at 10:05 PM, Melissa Cope <[EMAIL PROTECTED]> wrote:
> Here's the story: We have about 20 logos. We want a random four displayed. In 
> and of itself this is not very complicated, but a third party wants to add 
> and delete logos from the pool.
>
> It seems to me that the easiest way to do this (once we put in a self-admin 
> section to upload/delete logos) would be to input the contents of the logo 
> directory into an array, then use randrange to choose positions in the array 
> (along with a listfind loop to make sure there aren't duplicates). My problem 
> is that I can't figure out how to transfer the cfdirectory results to an 
> array. Could you point me in the right direction? Thanks!

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309523
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to