What he'd like is something like this ...
Rank File Count
---- ---- -----
1 File W 13
2 File L 8
3 File A 4
4 File K 2
If you keep a count of the d/l's in a db then just query your file names,
rank by d/l count, and for the rank just output the Queryname.CurrentRow
value.
For example ...
<CFQUERY
Name="myQuery"
Datasource="myDSN">
SELECT Filename, Count
FROM DOWNLOADS
ORDER BY Count
</CFQUERY>
<table>
<tr>
<td>Rank</td>
<td>File</td>
<td>Count</td>
</tr>
<CFOUTPUT Query="myQuery">
<tr>
<td>#myQuery.CurrentRow#</td>
<td>#myQuery.Filename#</td>
<td>#myQuery.Count#</td>
</tr>
</CFOUTPUT>
</table>
Hope this helps,
Steve
-----Original Message-----
From: Christopher Olive, CIO [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 08, 2000 4:52 PM
To: CF-Talk
Subject: RE: ranking a download count.
the last sentence doesn't really make sense. you'd like to display the
files by download count, but without ordering by download count?
chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com
-----Original Message-----
From: Emmet McGovern [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 07, 2000 11:31 AM
To: CF-Talk
Subject: ranking a download count.
Im not sure how to go about this. I'm writing a download count to a
database so i can keep track of how many times each file is downloaded.
However, i'd like to display the the files ranking in a top 100 sort of list
only not in order from 1-100. How would i output their rank according to
the amount of times the file has been downloaded without listing the items
in a desc order by download count?
Thanks,
Emmet
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]