hi i found this code in the forum on a <<< next-previuos >> pager
<?php
$limit = 4; // rows per page
if (!isset($row)) $row= 0;
$sql = "SELECT * FROM Table Limit $row,$limit";
$db->query($sql);
$totaldocs = $db->recordcount(); // get record count
while ($db->next_record()){
// spit out the records here
};
// prev / next links
if (($row - $limit) > 0){
$var = $row-$limit;
$back = "<a href=\"events.php?row=$var$extraurl\"><b><< back</b></a>";
};
if ($row != 0 && ($row - $limit) <= 0 && $row != ""){
$back = "<a href=\"events.php?row=0$extraurl\"><b><< back</b></a>";
};
if (($row + $limit) < $totaldocs){
$var = $row+$limit;
$next = "<a href=\"events.php?row=$var$extraurl\"><b>next >></b></a>";
};
print $back.$next;
?>
and i took it but i get the following error:
Fatal error: Call to a member function on a non-object in /home/tucuadre/public_html/displaypage.php on line 47
can you please get me some feedback on this ?