SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    philmont
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    voting for top 5

    I have a site that will be using a voting system, and users (after logging in) are only able to vote for a particular person once per category.

    I currently have my database with users, categories, and I believe I might need a few more tables for storing of the rankings and possible IP addresses.

    I'm looking at doing a voting system similar to that of the Condorcet method
    http://en.wikipedia.org/wiki/Condorcet_method
    :: each user can choose 5 contestants per category, ranking their preferences to the top 3-5. I know this will be difficult to do, so any other options on voting would be helpful. After each user votes for their choices, they can't vote again, with the selections being stored with their user name and sessions/cookies/ip addresses.

    I have over 100 contestants and about 10-20 categories that they can be voted for. I have searched the internet for possibilities, but most of them aren't what I need or would not be able to use a database.

    Whats the best way to get a ranking/voting system in?

    What do I need to do in order to make something like this work?

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zerakh View Post
    I'm looking at doing a voting system similar to that of the Condorcet method
    http://en.wikipedia.org/wiki/Condorcet_method
    :: each user can choose 5 contestants per category, ranking their preferences to the top 3-5. I know this will be difficult to do, so any other options on voting would be helpful. After each user votes for their choices, they can't vote again, with the selections being stored with their user name and sessions/cookies/ip addresses.
    This is rather easy to do. All you need is a table to save the votes: (id, username, contestant, category, rank). The rest are simple sql queries counting the votes.
    Saul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •