(I couldn't make up a good title, sorry)
So I use this pagination:
$page = $_GET['page'];
$max = 5;
// if $page is empty, set page number to 1
if (empty($page)) $page = 1;
$limit = ($page - 1) * $max;
$sql = mysql_query("SELECT * FROM posts ORDER BY date DESC LIMIT $limit, $max");
$totalres = mysql_result(mysql_query("SELECT COUNT(id) AS tot FROM posts WHERE tid = 1"),0);
$totalpages = ceil($totalres / $max);
?>
This works, but what I want is that the post with the oldest date always stays on top even if I change page. How can I do this? I know you can but I cant remember how.
Hopefully you do, thanks