<?php
$conn = mysql_connect("localhost", "wetsoxor_student", "coyote");
mysql_select_db("wetsoxor_davinci", $conn) or die(mysql_error());
$sql = "SELECT * FROM blog where user='david' order by count DESC";
$result=mysql_query($sql, $conn) or die(mysql_error());
while ($newArray = mysql_fetch_array($result)) {
$when = $newArray['when'];
$name = $newArray['name'];
$comment = $newArray['comment'];
print "<hr> On $when $name said<p>$comment</p>";
}
?>