Skip navigation
Currently Being Moderated

Database structure for a 5 star ratings system

Jun 2, 2013 1:31 AM

This is something I've been asked to look at creating. At the moment the site has a database back end storing details of a few hundred holiday properties. So that part is already set up.

 

So I'm familiar enough with databases etc, but less so the formulas and any additional database structure for any voting.

 

It would be pretty simple, ie visitors could vote 1, 2, 3 4, or 5 stars for any property.

 

There needs to be a total score recorded somewhere for each property.

 

And the site needs to display the average score for that property.

 

Any pointers on this much would be much appreciated.

 

Thanks.

 
Replies
  • Currently Being Moderated
    Jun 2, 2013 5:59 AM   in reply to johngordon12

    I'm sure you could find good resources using Google and searching for "PHP 5 star voting" - have you tried that?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 2, 2013 12:16 PM   in reply to johngordon12

    Sure - posting on a forum is always better. But with a question like this, you are also likely to get 101 different ways of doing it as well! No wrist slap was really intended.

     

    When I did that search and looked at the first 5 hits, it seemed that the answers were spot on for you.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 3, 2013 5:40 AM   in reply to johngordon12

    Let us know how you get on, please.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points