Click to See Complete Forum and Search --> : Decending order using query


mayooresan
04-09-2008, 09:57 AM
$Query="select mesgID, title, content
from
mesgboard
ORDER BY mesgID DESC;"


I want to display the latest last entrd message as the first result, so I used the tag ORDER BY mesgID DESC

It's working perfectly all rite in query window..

when I intergrate it to PHP it displays the last message as the last result...!!!


echo "<table border=1>"; //Opening table
while($row = mysql_fetch_array($r))
{
echo "<tr><td><h5>". $row['title'] ."</h5></td><td>" .$row['content'] . "</td></tr>"; //table content
}
echo '</table>'; //closing table


where is the wrong in Query or PHP?