View Full Version : Archived post

09-04-2005, 05:16 PM
I have a page with post. I have it show the 5 newest post. I want to keep it like that but I also want users to see ther other post with out having to view a page with 86,047 post or having a really long nav. Please help.

Thanks advanced,

09-04-2005, 08:39 PM
Use pagination.


09-05-2005, 12:11 AM
That only works for PHP5 I need this to work for PHP4

09-05-2005, 06:40 AM
Pagination is software independent. PHP5, PHP4, ASP, Perl, C, Ruby, I bet Javascript can do it with some clever scripting.

09-06-2005, 04:16 AM
Pagenation is ****ed up. All I want to do is archive my post.

09-07-2005, 04:43 AM
No need to get upset...

What you are looking for im sure is pagination of some kind... If you just want to archive posts other than the first 5 then you can simply make another page that selects all but the first 5 results, and displays them... of course, there could be several results other than the first 5, so you would need to split them into pages hence pagination.

The links shown on google there look all ok, none of them require PHP 5. (at least none that I found)... Pagination is not a PHP module or technology, its just a name given to the sequential numbering of pages. (This forum use pagination on the forum view and thread views).

Take a better look at the google link provided for you there, its all in there!

09-08-2005, 03:53 AM
The only thing I found that I could use was this.

// Pagination script

/* This simple script automates the creation of navigation links for the datas extracted from
the database.Pls Feel free to modify it and mailme back.Thanx
Author: Sam George; ocptime@rediffmail.com
Licence: GPL.

// No Files are included and stylesheets and other config files can be
// included according to your wish.
// Uses ADO_DB for database abstraction and no documentation as the script is fairly straight forward

$sqlCount="SELECT count(u.id) FROM msg_mail as m, user as u
WHERE m.userTo='$userId'
AND m.status <> 'trash'";

$rsCount = $db->Execute($sqlCount);

$totalrows = $rsCount->fields[0];


$page = 1;

$limitvalue = ($page - 1) * $limit;

$sql = "SELECT m.mailId, m.userTo, m.userFrom, ".$db->substr."(m.subject,1,25) as subject, m.status, u2.name, u.userName, m.date
FROM msg_mail as m, user as u
AND m.status <> 'trash'
ORDER BY m.date DESC LIMIT $limitvalue, $limit";

$rs = $db->Execute($sql);


while($row = $rs->FetchRow()){


//put uer <td> and <tr> here to fill the data

if($page > 1){
$pageprev = $page-1;
echo("<a href=\"mypage.php?page=$pageprev\">PREV</a>&nbsp;");

$numofpages = ceil($totalrows / $limit);

for($i = 1; $i <= $numofpages; $i++){
if($page == $i){
echo("<a href=\"mypage.php?page=$i\">$i</a>&nbsp;");

if($page < $numofpages){
$pagenext = ($page + 1);
echo ("<a href=\"mypage.php?page=$pagenext\">NEXT</a>");

That gives me an idea of how to do my own.