My code here works sweet for retrieving the last entry in my table.
It returns the last username and comment to my flash webpage. How do I retrieve the last 5 comments? Of course they will all need to have different variable names so they can be ordered in flash.PHP Code:<?php
mysql_connect("localhost","username","password") or die();
mysql_select_db("comments") or die();
$result = mysql_query("SELECT * FROM comments ORDER BY ID desc LIMIT 1") or die();
while($row = mysql_fetch_array($result))
{
echo "uservar=".$row['username']."&commentvar=".$row['comments']."&timeinfo=".$row['date']."";
}
?>





Reply With Quote