PHP Classes

AJAX Paginator: Split MySQL results in pages retrieved using AJAX

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum (19)   Blog (1)    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 69%Total: 8,553 This week: 1All time: 191 This week: 571Down
Version License PHP version Categories
ajax-paginator 1.50GNU General Publi...5.2HTML, PHP 5, Databases, AJAX
Description 

Author

This class can be used to split MySQL query results displayed in pages retrieved using AJAX.

It takes a MySQL query and computes the total number of rows it returns to generate HTML links in order to browse different pages of the query results.

Each page displays up to a given limit number of results.

The generated links trigger the execution of JavaScript code that retrieves the contents of the respective page using AJAX requests.

The class can also execute queries to perform searches for information in given columns.

It has a jquery plugin that handles requests and responses just for flexibility

Picture of Omar Abdallah
Name: Omar Abdallah <contact>
Classes: 1 package by
Country: Egypt Egypt
Age: 37
All time rank: 3014 in Egypt Egypt
Week rank: 420 Down5 in Egypt Egypt Down

Details

Deployement: 1. import the customers table(customers.sql) 2. change the database configuration options in the testpage.php and the sub_page.php 3. enjoy :) Use: first of all you have to establish a database connection using mysqli or if you decide to use anything else just modify the database related method calls from the core class The you instantiate the core class paginator passing to it: 1. page id 2. Records per page 3. SQL Query 4. MySQLi Connection Object Then call method: paginate() It does all the work and returns an associative array, else if you want to access the MySQLi result object you can access it by using the object property called result(e.g. $paginator->result) The getLinks Method returns a string that contains the actual html for the pagination links You also have to use the same settings or the same code for the subpage also. If you need further assistance contact me: omar.php@gmail.com I hope this class is useful for you.

Screenshots  
  • screenshot.gif
  Files folder image Files  
File Role Description
Files folder imagejs (2 files)
Image file ajax-loader.gif Data the loader image
Plain text file customers.sql Data sql script to generate the test table
Plain text file ajaxpaginator.class.php Class core class
Plain text file readme Doc. readme
Image file screenshot-1.gif Screen screenshot
Plain text file style.css Data css style
Plain text file sub_page.php Example a php file that takes the requested page number and return the paginated table (requested with ajax)
Plain text file testpage.php Example main test file

  Files folder image Files  /  js  
File Role Description
  Plain text file jquery-1.4.2.min.js Appl. jQuery 1.4.2
  Plain text file jquery.paginate.js Data jquery plugin to handle the ajax requests and responses

 Version Control Unique User Downloads Download Rankings  
 0%
Total:8,553
This week:1
All time:191
This week:571Down
User Ratings User Comments (7)
 All time
Utility:89%StarStarStarStarStar
Consistency:85%StarStarStarStarStar
Documentation:80%StarStarStarStarStar
Examples:80%StarStarStarStarStar
Tests:-
Videos:-
Overall:69%StarStarStarStar
Rank:327
 
hi, I'm using this class to paginate some queries.
14 years ago (Vitor Borges dos Santos)
80%StarStarStarStarStar
Excellent pager I have used this to make a last torrent image...
13 years ago (cooly)
60%StarStarStarStar
Excellent!
13 years ago (Ivan Gonzalez)
65%StarStarStarStar
Excellent! class, i modify some in php code to adapt to my ap...
13 years ago (cesar Landazabal)
80%StarStarStarStarStar
I'm basically using this to display results from my MySQL dat...
14 years ago (Josh LaMar)
80%StarStarStarStarStar
for average or advance user.
14 years ago (cuma elp)
60%StarStarStarStar
thank you very much.
14 years ago (cayrol)
77%StarStarStarStar