<?php
 
 
include('db.class.php');
 
include('pagination.class.php');
 
 
$host = 'localhost';
 
$dbName= 'db_name';
 
$user = 'user_name';
 
$pass = 'db_user_pass';
 
 
$db = db::getInstance($host,$dbName,$user,$pass);
 
$pagination = new pagination($db);
 
 
$sql = "SELECT * FROM `table_name`";
 
$pagination->sql = $sql;
 
 
//Example of setting the WHERE clause seperate if you like
 
$where = "WHERE `timestamp` < '".time()."'";
 
$pagination->where = $where;
 
 
 
 
 
$result = $pagination->result();
 
//print_r($result);
 
$links = $pagination->pager();
 
//echo $links;
 
 
 |