Stars for ratings

Use this case statement in a snippet with a rating parameter to change numerical ratings to stars:

case
  when ROUND([rating]) = 5
    then '★★★★★'
  when ROUND([rating]) = 4
    then '★★★★☆'
  when ROUND([rating]) = 3
    then '★★★☆☆'
  when ROUND([rating]) = 2
    then '★★☆☆☆'
  when ROUND([rating]) = 1
    then '★☆☆☆☆'
  else null
end
1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Oh man, I love it! Great idea!

    Reply Like
Like2 Follow
  • 2 Likes
  • 1 yr agoLast active
  • 1Replies
  • 375Views
  • 2 Following