|
Hey
everyone:
I'm
hoping somebody can help me come up with the most efficient solution to my
problem. I currently have a voting system set up with voting values
of 1 to 10 given to any item. Users can view the items by rank
based on the average vote. I need to be able to weight the
results by assigning higher values to each vote. For
example:
1 = 100 pts
2 = 75 pts
3 = 50 pts
4 = 25 pts
5 = 20 pts
6 = 15 pts
7 = 10 pts
8 = 5 pts
At
anytime, the weighted values will change so I cannot just apply the weighted
values at the time the vote is being cast and save this value to the
database. I need to apply the weighted value to the vote from within or
after I have pulled the votes using a query. Before the weighted value was
required I had this:
select
avg(vote) as average_vote from votelist
group
by vote
order
by vote
Easily
handled with a simple SQL statement but now I think I'm going to have
to set-up an array to deal with it and loop through the array to apply the
weighted values and then average it out. I'm really hoping to avoid
this. Any help would be greatly appreciated.
Mark.
|
Title: Message
- [CFTALKTor] HTTP Header Paul Giroux - Sympatico
- Re: [CFTALKTor] HTTP Header Bob Keleher
- Re: [CFTALKTor] HTTP Header Mark D'Souza
- Re: [CFTALKTor] HTTP Header Paul Giroux - Sympatico
