hatrickpatrick Posted November 3, 2007 Share Posted November 3, 2007 making a top 10 list here... Let's say I have a list of games, say 20 of them. I have a table which is "games": game_id game_name I have another table for people to rate the game, "game_ratings": rating_id rating_gameid rating_value (Can be between 0 and 5) So when I'm showing the rating for a game, I just get the average of rating_value fields for rows with that game ID. If I want to have a list on the home page of the top rated games, how would I do it? Or is it even possible? I would want to basically find the game with the highest average, then the next highest, then the next, etc... Can it be done? Quote Link to comment https://forums.phpfreaks.com/topic/75949-sqlphp-to-count-the-most-popular-row-values-for-a-top-10-list/ Share on other sites More sharing options...
Barand Posted November 3, 2007 Share Posted November 3, 2007 see http://www.phpfreaks.com/forums/index.php/topic,166263.0.html Quote Link to comment https://forums.phpfreaks.com/topic/75949-sqlphp-to-count-the-most-popular-row-values-for-a-top-10-list/#findComment-384420 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.