Jump to content

Voting/rating/polling System


smerny
 Share

Recommended Posts

What would be the best way to set up a table for voting/rating/polling that keeps track of which member has voted or rated each thing so you can stop them from voting or rating multiple times?the only way I could think of is to have a table that consists soley of votes/ratings... where each individual vote/rating would take a row... with fields like:1) ID_poll (the ID of the thing they can vote on or rate)2) ID_user (who voted)3) rating (could be 1 or 2 for yes or no vote, or 1-10 for a rating, or 1-whatever for a poll... have the php work them differently depending on what they are)and that would probably be it? don't think it would be necessary to have a ID for each vote... is this the best way to do this? am i missing anything?

Edited by smerny
Link to comment
Share on other sites

That's all you need. The vote ID isn't necessary, per se, but it helps with sorting.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...