Namespace pagination

Procedures for paginating a datasource

Method Summary

Listing of public methods:
pagination::get_total_pages
pagination::page_number_links
pagination::paginate_query

Method Detail

* indicates required

Public Methods:
pagination::get_total_pages
  by Michael Pih
Gets the number of pages returned by a query PRE: requires {$sql}
Parameters:
db * A database handle

pagination::page_number_links
  by Michael Pih
Generate HTML for navigating pages of a datasource
Parameters:
page * The current page number
total_pages * The total pages returned by the query

pagination::paginate_query
  by Michael Pih
Paginates a query
Parameters:
sql * The sql query to paginate
page * The current page number

Private Methods:
pagination::get_rows_per_page
Returns the number of rows per page

pagination::ns_set_to_url_vars
  by Michael Pih
Converts an ns_set into a list of url variables
Parameters:
set_id * The set id

* indicates required