Brimbox Logo Brimbox Version 2.3.4 Released

page_selector>>

Method to output the page selector links when returning query results in pages.

Class: bb_main, called as $main

File: bb_main.php (php)

Declaration:

function page_selector($element, $offset, $count_rows, $return_rows, $pagination)

Usage:

$main->page_selector($element, $offset, $count_rows, $return_rows, $pagination);

Outputs: Page selection navigation links along the bottom of a page returning records.

Note: This method requires a form variable in the required form of the module passed as $element.

Note: This method uses the global javascript function bb_page_selector.

Parameter: $element (string)
Name of a form hidden input element to be set via javascript function bb_page_selector.

Parameter: $offset (integer)
The offset variable represents the page of the query to be returned. The lower limit of the query is calculated from this value and is used in the OFFSET clause.

Parameter: $count_rows (integer)
The total rows returned by the query without LIMIT or OFFSET, found using count(*) OVER () as cnt in the SQL query.

Parameter: $return_rows (integer)
The number of rows in a page, based on constant RETURN_ROWS and used in LIMIT clause of the query.

Parameter: $pagination (integer)
The number of pages displayed in the page selector, based on the constant PAGINATION.

Updated: 2016-06-16