hey
that doesnt work, i want to pick out the last 5 rows, and instead of them showing as 15-16-17-18-19-20, i want it go in reverse order, from 20 to 15.PHP Code:$sql = "SELECT * FROM announcement ORDER BY announcementid DESC LIMIT $num, 5";
$result = mysql_query($sql);
$sql = "SELECT * FROM " . $result . " ORDER BY announcementid ORDER BY ASC)";
if i do "ASC" instead of desc in the first sql statement, it picks 1->5 instead, i tried nested statements too, didnt work. ideas?
$num = number of rows - 5PHP Code:$sql="SELECT * FROM (SELECT * FROM announcement LIMIT $num, 5) ORDER BY announcementid ORDER BY ASC"
thanks
