I don't know how to ask this question but I'll try my best. I am designing a Comment and Reply system such that each comment has a particular number of replies and the comments and replay are stored separately in two tables in the same MySQl database, so we have to two tables
Table 1
Comment ID | Comment | Date
Table 2
X | Reply Text | Date
where X represents the comment's ID the reply belongs to.
I know that the code
$res=mysql_query("SELECT * from commenttable ORDER BY `Date` DESC ");
while($row=mysql_fetch_array($res))
{
echo $row["Comment"];
}
lists the comments from recent to old.
Is it possible to modify this code to list the comments from the one with biggest number of replies to least.