I have a WordPress data table as an image. My user rating is (max 5*).
(In my data I have 2 rating 5* for postid = 1 / 1 rating 4* for postid = 1). How do I echo number rating 5* for postid = 1 (is 2)? Similar for rating 4* / 3*...1*.
Any ideas? Thanks.
Your SQL statement could be "SELECT count(id) FROM table WHERE postid = 1 AND rating = 5"