Located in File: /sampaginator.inc.php
We will need one class to work with this class (1) SamMysql Class
$columns_per_row (line 144)
The number of columns to display per row on each page
$fieldA (line 151)
The name of the first field we need to search for in the table
$fieldB (line 165)
The name of the second field we need to search for in the table
$ID_field_name (line 116)
The name of the ID field of the table we are working on
$mydb (line 72)
The instance of the SamMysql database class
$operation (line 179)
The type of operation to perform, search or normal query
$page_number (line 101)
The page number of the page to be displayed
$page_url (line 109)
The url of the page using this class now
$rec_perPage (line 130)
The maximum number of records per page to be displayed
$rows_per_page (line 137)
The number of rows to display per page
$tableResult (line 79)
The resouce id for the results from the database query/search
$table_name (line 123)
The name of the table in the database
$totalPages (line 93)
The total number of pages of records we have from the database query/search
$totalRecord (line 86)
The total number of available records from the database query/search
$valueA (line 158)
The value of the first field we need to search for in the table
$valueB (line 172)
The value of the second field we need to search for in the table
Constructor SamPaginator (line 200)
The Class Constructor Accepts your database connection object and other parameters.
Method displayerror (line 976)
Function to display fine error messages if it occurs in the process of doing anything in this program.
Method getResults (line 250)
Function that get our records from the given table in the database
It does not take any parameter.
You can use this if you want to display the records in your own way.
Otherwise, you don't need to call this function as there is another function that will display the records for you.
EXAMPLE:
Method getTotalRecords (line 415)
Function that returns the total records in the given table in the database This function returns the total records based on our query/search You can use this function to test for any result so that you can display a very neat error message for your visitors if no record is available yet in the table. EXAMPLE
Method showAllRecords (line 491)
Function that display the records in a single lines with headings
This function displays your records on the page using your supplied parameters.
The 'Type of Record' parameter is very important. This is what tells the function how the display of your records will be handled.
Method showArticles (line 533)
Function that display the Artcles/News records in the desired format
This function displays your Articles/News records on the page using your supplied parameters.
The parameter is very important. This is what tells the function how the display of your records will be handled.
Method showPagenumber (line 785)
Function that display the page numbers at the lower part of the page This function will display the page numbers using the style you define in the classes for both the present page and other pages.
Method showPhotoGallery (line 687)
Function that display the Picture Gallery records in the desired format
This function displays your Photo Gallery records on the page using your supplied parameters.
The parameter is very important. This is what tells the function how the display of your records will be handled.
Method showTitle (line 949)
Function that display the title or header section for the records on each page This function can be used to display the title or header section of the display It takes the title of the record and the css id defined for the display as parameters