Ordering by top commented.
Posted
by MILESMIBALERR
on Stack Overflow
See other posts from Stack Overflow
or by MILESMIBALERR
Published on 2010-04-27T02:58:02Z
Indexed on
2010/04/27
3:03 UTC
Read the original article
Hit count: 416
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"));
© Stack Overflow or respective owner