well a couple of days ago i asked how to make my news page display the news from newest to oldest using mysql:
and someone told me to use ORDER BY (thankyou to that person!)
bbut now its still the same.
code:
$db = mysql_connect("localhost");
mysql_select_db("pnm",$db);
//PROBLEM AREA
$sql="SELECT * FROM pnm_news ORDER BY sid";
$result=mysql_query($sql,$db);
$num = mysql_num_rows($result);
$cur = 1;
while ($num >= $cur) {
$row = mysql_fetch_array($result);
$title = $row["title"];
$author = $row["author"];
$date = $row["date"];
$story = $row["story"];
$sum = $row["summary"];
$sid = $row["sid"];
anyway is there anything else i have to do to make it display the higher number id on top and the lower id number under? (newest on top and older under)
any help would be good! 😃