Hello,
I'm having a bit of trouble trying to add a where clause into a mysql statement I'm using. The page is: www.austadiums.com/stadiums/sort_rated.php
Basically, site members have the ability to give each Australian Stadium a rating. On the above page, I show the highest rating stadiums. However so I don't have the situation where a stadium jumps to the top of the list because 1 person has voted for the stadium, and given it a 100% rating, I would only like to display stadiums which have had over 10 votes in total.
The query i'm running against my mysql database is:
SELECT stadium_id, AVG(overall) as rated, Count(rid) as total FROM reviews GROUP BY stadium_id ORDER BY rated DESC, stadium_id LIMIT 50
So 'rated' outputs the rating (%), and 'total' outputs the total votes. I want to only show results where 'total' is 10 or more. I've tried for hours using different methods to add a where clause in, but nothing seems to work. If anyone could give me a hand, that would be greatly appreciated!! Maybe there's a better way to do the whole query? My knowledge really is pretty basic to be honest. :o Thanks heaps!
Regards,
Cam