Jump to content

[SOLVED] Help for MySQL Query


blooddrainer

Recommended Posts

Hello all, i have some problem.

 

I have field id, rating, category. Rating content integer, category varchar, id (autoincrement). I want to make query that get 6 result from the table with biggest rating. I have some query but there is some bug.

 

Here it is:

SELECT `gid`, AVG(`rating`),`cat` FROM `games_rating` group by `gid` having `cat`='trailers' order by AVG(`rating`) desc limit 0,6

Link to comment
https://forums.phpfreaks.com/topic/126234-solved-help-for-mysql-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.