I sure do, I'll explain it a little for people who find it hard to follow my code:
The software itself is rather huge, but I've posted up a modified snippet of it, where it pulls the data out of the database and paginates it. The example I've provided actually performs the SQL Query twice (One time to get the amount of results, and the second time to get the actual data), but you can use "$numRows = count($currentPageRows);" if you can figure out a way to do so.
Basically, you just need to add this to your SQL:
PHP Code:
if ($currentPage!="all")
{
if ($currentPage < 1)
{
$currentPage = 1;
}
$numRowsQueryResult = mysql_query($MySQL_Query . ";", $dbConn);
$numRows = mysql_num_rows($numRowsQueryResult);
$MySQL_Query .= "LIMIT " . (($currentPage*$numberOfResultsPerPage)-$numberOfResultsPerPage) . ", " . $numberOfResultsPerPage;
}
$currentPageRows = mysql_query($MySQL_Query . ";", $dbConn);
You would get the current page number and place it into "$currentPage" from $_GET.
Here's what calls the pagination:
PHP Code:
if ($currentPage!="all" && ceil($numRows/$numberOfResultsPerPage) >= 1)
{
echo "<center>Page: ";
$totalPages=ceil($numRows/$numberOfResultsPerPage);
echo printPageIndexes($currentPage, $totalPages, $myCurrentURL, "&page", 5, true, "all");
}