PDA

View Full Version : 5 Star Rating System


ABC123

13axtula
09-18-2010, 12:43 PM
Hello,

I am setting up a website to sell comic books for an independent publisher using Alpha Five and I was wondering how to set up my MYSQL database for SIGNED IN users to rate a comic book.

So the general idea is that once a user signs in, he has access to rate comic books (but only one per comic) via a drop down box.

The drop down box displays the field
rateimage (which is just an image of stars) ie *****
but puts a value of 0 to 5 from the rateid (field)


Since multiple people will be rating, I would like an idea of how to average the rateid, and display the appropriate rateimage.

Could someone tell me the most efficient way to set up my databases for that?

Thank-You in advance!

Joel

Peter.Greulich
09-18-2010, 02:42 PM
You could use a numeric field w. dropdown values of 0 to 5. Then use a conditional image field to show 0 to 5 stars based upon the value of the numeric field. Fortunately Alpha has built in icons for 1 to 5 stars you can use. For 0 you could use some other icon.

13axtula
09-19-2010, 06:10 PM
Thank-You Peter! That is very helpful!