I have a simple query but cannot recall how to do this.
Code: Select all
include "dbconn.php";
$result = mysql_query ("SELECT status, COUNT(status) as num_of FROM usercomments WHERE status = 'live'");
while ($row = mysql_fetch_array($result)){
echo "Live comments" .$row['num_of'];
}
mysql_free_result($result);