This class is supplied by Olowoyo Samuel and can be used to display database query results split in multiple pages.
It can perform queries to a MySQL database table and retrieve a range of results to display in the current page given the page number and the limit of results to display per page.
The class can display the results as a listing of articles or as photo gallery.
You can download it here (303kb including examples)