Page in Question: http://www.cyndustries.com/bugmusic_vote_completed.cfm

(Unless you're into very experimental electronic music I wouldn't advise 
listening to any of the pieces!! Otherwise, hide your cat!!!)

There's a table holding the info for each piece
There's a table where all the scores are stored

So, the page is set up like this:

<Cfoutput query="MUSICSELECTION">

   <cfloop query="getscores">
     <!---  Code to count the number of votes in
            each catagory for each piece and total here --->
   </cfloop>


<!--- Code to average scores for each catagory
        (total score / number of votes --->

<!---DISPLAY SECTION SHOWING SCORES AND TOTALS ---!

</cfoutput>

Here's the question - How could I get the DISPLAY SECTION to list in 
decending order of TOTAL SCORE?

Hindsight: I could have calculated all these values each time somebody 
voted and added a field to the database and sorted on that. I wasn't 
thinking about that when I rushed to get the voting up for the client. I 
*could* just add a field and update the database when voting is finished 
and sort - but I'm curious if there's anyway to do it without touching 
the database again. Ideas?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195309
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to