This is a question regarding the mysql_num_rows command. Basically what I want to ask if it's possible to sum the results up and order them in a descending order.
$fetchrank = mysql_query("SELECT * FROM leden WHERE level = 6 OR level = 106");
while ($getrank = mysql_fetch_array($fetchrank, MYSQL_ASSOC)) {
$getranked = mysql_query("SELECT nieuws_id FROM nieuws_berichten WHERE member_id='".$getrank['member_id']."'");
$critical = mysql_num_rows($getranked);
$posts = $critical;
echo"".stripslashes(substr($getrank['gebruikersnaam'],0,25))." has ".$posts." posts!";
}
echo"</div>";
}
This actually shows it what I want, but I want it to order the num_rows results now, from highest to lowest. Is that possible through an array? so I can use a PHP command or is there another way?
I am aware that mysql_num_rows is outdated, however at the moment I'll be working with this old framework and perhaps in the near future we'll be changing to another.