Ordering by top commented.
- by MILESMIBALERR
How would I list a page of the top commented pages on the site with PHP and mysql.
The database is set up sort of like this:
page_id | username | comment | date_submitted
page 1-------bob-------hello-----current date
page 1-------joe-------byebye-----current date
page 4-------joe--------stuff-------date
page 3-------mark--------this--------a date
how would you query it so that it orders them by top commented pages?
here is a simple query to start with:
$querycomments = sprintf("SELECT * FROM comments WHERE !!!!!HELLLLLP HERRE!!!!! = %s ORDER BY !!!!!!HELLLP HERE!!!!!! DESC",
GetSQLValueString(????????????, "text"));