Hello and welcome to the super cool Wetfish Pagination Function!!

How do I do it?

Paginate('SQL Query', 'Limit per Page' [, 'Page Number', 'Query String']);

The page number is optional, with a default value of 1.
The query string is also optional, in case your URLs need to use get variables.

Paginate() returns an array of two values:
 1. An array containing the data from SQL
 2. An HTML formatted string linking to the nearest 10 pages

Examples

list($Data, $Links) = Paginate('Select `PageID` from `Wiki Pages` order by `Time` desc', 50);


$Query = "Select `Path`, `Title`, `Content`
			from `Wiki_Pages`
			where match(`Path`, `Title`, `Content`)
			against('$Search')");

list($Data, $Links) = Paginate($Query, 25, $_GET['page'], $_SERVER['QUERY_STRING']);