I am developing a star rating system with 1-5 stars. In my database I am saving them like this:
$stars_1 = 1; $stars_2 = 6; $stars_3 = 3; $stars_4 = 11; $sta
Needs to be like this:
($stars_1 + $stars_2 * 2 + $stars_3 * 3 + $stars_4 * 4 + $stars_5 * 5) / $total_votes;