echoing last topic posted in my forum
Posted: Tue May 13, 2008 6:05 pm
Can some one expand on this for me as I just want the last topic that was posted in forum to echo or print not all the posts.Using Mysql database.
$query = "SELECT body FROM my table";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
echo " {$row['body']} <br>";
}
?>
Thanks.
$query = "SELECT body FROM my table";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
echo " {$row['body']} <br>";
}
?>
Thanks.