I have this following script that will display to me the last 5 rows and its specific fields in a table. Problem is, it is displaying the first 5 rows. I want to display the last 5 so i get the latest comments in those rows. What do i have to enter in my SQL query to be able to pull that up?
Thanks guys for any help.
Vinnie
//Start display of shortened comments
MYSQL_CONNECT( "localhost", "root", "blah");
mysql_select_db("mysql");
$comments=mysql_query("SELECT owner, comment FROM parts_ratings WHERE parts_id='$id' limit 5");
if(mysql_num_rows($comments)) {
while ($r = mysql_fetch_array($comments)) {
$comment = $r["comment"];
$owner = $r["owner"];
$short_comment=substr($comment,0,30)."...";
echo "<font color=$font_color_body face=$font_face size=$font_size_small>$short_comment
-$owner</font><br>";
} echo "<br><center><font color=$font_color_body2 face=$font_face size=$font_size_small><img src=ima
ges/arrow.gif align=middle> Read more comments!</font></center>";
...
..
..
..
.