Jump to content

[SOLVED] 5 star rating system


play_

Recommended Posts

It's not code i need help with, but on the math behind it.

 

Say i have a 5 star rating system for blog entries.

 

I would store in the database..

 

table: ratings

 

ratingID    |    userID    |    entryID    |    rating   |
------------+--------------+------------+----------------+
      1     |      43      |      3     |      5         |

 

Something like that.

 

Now from here i'm suck.

 

Say i go to a blog entry's page...how will i know how many stars to "light up" based on the database info?

is it based on the average?

Link to comment
https://forums.phpfreaks.com/topic/172080-solved-5-star-rating-system/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.