well, if you want to, first tell me what your exact purpose is, you want to create a report from a database, but you want to split it in different pages. Do I understand you correctly? Well, first you must query your database for the total count of results
$query="SELECT <primary_key> FROM <table>";
mysql_num_rows will give you the count of results, then you query the database for the result of the current page, $page is the current $page, the first is 0, the second 1, etc..
$rowsperpage=20;
"SELECT <fields> FROM <table> LIMIT ".($page*$rowsperpage).", $rowsperpage";
if you want to order your results on a specific field, just add ORDER BY <field> ASC/DESC,<field2> ASC/SEC,etc..
you can also make links to the previous en next page:
<a href="<? echo $PHP_SELF.'&page='.($page-1); ?>">previous</a>
<a href="<? echo $PHP_SELF.'&page='.($page+1); ?>">next</a>
you could also check if you are on the first page, then don't echo the previous link and if you are on the last page, don't echo the next link..
Hope I understand you correctly and this helps you..
Regards Bruno