<?
// see online: http://kentung.f2o.org/scripts/paging/sample1.php
require("paging_class.php");
$paging=new paging(5,5);
$paging->db("localhost","username","password","dbname");
$paging->query("Select * FROM paging ORDER BY MY_FIELD ASC");
$page=$paging->print_info();
echo "Data $page[start] - $page[end] of $page[total] [Total $page[total_pages] Pages]<hr>\n";
while ($result=$paging->result_assoc()) {
echo $paging->print_no()." : ";
echo "$result[MY_FIELD]<br>\n";
}
echo "<hr>".$paging->print_link();
?>
|