Exploded Fiber 0 Newbie Poster

Hey all,

Im creating a voting website using PHP & SQL. Im planning on using a single table to store votes. Something like this.

-- Voter_ID -- Candidate A-- Candidate B -- Candidate C --
### --- 1 --- 2 --- 3
### --- 1 --- 3 --- 2
### --- 3 --- 1 --- 2

I should have mentioned at the beginning that this system is based on the PR-STV voting system so the numberic values assign preference.
My question is: Is it prudent to use a single table for storing these variable.
Secondly, is there a method to examin occurences of integers between columns better than:

"SELECT Candidate_A, COUNT(*) FROM prstv_vote
			GROUP BY Candidate_A
			ORDER BY COUNT(*) DESC"

I'd appreciate any suggestions available.
Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.