Hi, I have a system in place where users can rate a comment 1 to 5 and that is entered into the database as 1, 2, 3, 4 or 5 which is fine but i want to display the rating on another page. I have 6 images for 0 rating up to 5 star the images are name 0star.png etc How would i work out which image to show based on all the submissions to the database? Cheers, Adam
You could get the average rating with "SELECT AVG(rating_field_name) FROM table_name WHERE ...", and select the star image to display based on the result.