Hi, I have a MySQL table with three columns (name, ratings, score) that contain the results of ratings (1-10) for many sites in a directory for example (Yahoo, 234, 1872). In the Yahoo example, the average rating for Yahoo would be 1872/234 or an 8.
I am trying to construct a query that returns all sites with at least 5 total ratings such as ...
$sql = "SELECT * FROM statstable WHERE ratings > 5";
$result = mysql_query("$sql");
$myrow = mysql_fetch_array($result);
... but I want the query to order them by the average ratings (ratings/score). Is this possible? If not, how could I order the results of the above query in this way. Thanks!