Needasphelp
09-27-2005, 02:09 PM
Hello all. I have created a voting poll but am having trouble displaying the results. Basically, you can add a poll question and give it as many answers as you want through the admin section. When a user votes, it shows how many votes each answer has got eg:
Answer 1 : 6
Answer 2 : 4
Then I have some sql SELECT SUM(a_total)
From the table getting the variables from the poll ID. This also works fine for displaying, " 10 votes have been cast."
Problem is now displaying the percentages for the results ie:
Answer 1 : 60%
Answer 2 : 40%
Could anyone please help me. I really don't know how to do this.
Many thanks.
Answer 1 : 6
Answer 2 : 4
Then I have some sql SELECT SUM(a_total)
From the table getting the variables from the poll ID. This also works fine for displaying, " 10 votes have been cast."
Problem is now displaying the percentages for the results ie:
Answer 1 : 60%
Answer 2 : 40%
Could anyone please help me. I really don't know how to do this.
Many thanks.