PHP AJAX pagination: Show MySQL query results split in pages using AJAX

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 56%Total: 7,173 All time: 265 This week: 249Up
Version License PHP version Categories
php-ajax-pagination 1.0.0GNU General Publi...3.0HTML, Databases, AJAX
Description Author

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

It takes as parameters an SQL query, the number of results to show per page and the current page number.

The generates HTML and Javascript for links to browse the query result pages.

When the user clicks on the links an AJAX request is sent to a script that retrieves the page results and the respective pagination links.

Picture of Reneesh T K
Name: Reneesh T K <contact>
Classes: 2 packages by
Country: India India
Age: 38
All time rank: 24315 in India India
Week rank: 445 Down40 in India India Down

Details
Ajax Based Pagination.
Developed by Reneesh T.K
reneeshtk@gmail.com
It is free for you!!!!
It will display the out put like:

First | Previous | 3 | 4 | 5 | 6 | 7| 8 | 9 | 10 | Next | Last
Page : 7  Of  10 . Total Records Found: 20

Just pass the query ,records per page and starting from the page you want to display the pagination.

Advantage: It is connected to search process in the example and you may extend this feature as you like. It have a good style also.

For testing: Just create a sample table:
-- Table structure for table `students`

CREATE TABLE `students` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`)
);

INSERT INTO `students` VALUES (1, 'Reneesh');
INSERT INTO `students` VALUES (2, 'Aniesh');
INSERT INTO `students` VALUES (3, 'Babu');
INSERT INTO `students` VALUES (4, 'Antony');
INSERT INTO `students` VALUES (5, 'Praveesh');
INSERT INTO `students` VALUES (6, 'Dixon');
INSERT INTO `students` VALUES (7, 'Sanju');
INSERT INTO `students` VALUES (8, 'Neeraj');
INSERT INTO `students` VALUES (9, 'Siju');
INSERT INTO `students` VALUES (10, 'Noble');
INSERT INTO `students` VALUES (11, 'Bibin');
INSERT INTO `students` VALUES (12, 'Febin');
INSERT INTO `students` VALUES (13, 'Binu');
INSERT INTO `students` VALUES (14, 'Charles');
INSERT INTO `students` VALUES (15, 'jaggu');
INSERT INTO `students` VALUES (16, 'mani');
INSERT INTO `students` VALUES (17, 'milu');
INSERT INTO `students` VALUES (18, 'aravind');
INSERT INTO `students` VALUES (19, 'jay');
INSERT INTO `students` VALUES (20, 'hari');

Change the mysql connection settings in testpage.php and in test_sub.php page.

You can see some useful functions in the site http://reneeshtk.000a.biz and if you interested you can donate some amount to me :)

  Files folder image Files  
File Role Description
Accessible without login Plain text file pagination.js Data js file
Plain text file pagination_class.php Class main class file
Accessible without login Plain text file readme Doc. documentation
Accessible without login Image file screenshot Photo screen shot
Accessible without login Plain text file style.css Data css file
Accessible without login Plain text file testpage.php Example test page1
Accessible without login Plain text file test_sub.php Aux. test sub page

 Version Control Unique User Downloads Download Rankings  
 0%
Total:7,173
This week:0
All time:265
This week:249Up
User Ratings User Comments (3)
 All time
Utility:72%StarStarStarStar
Consistency:63%StarStarStarStar
Documentation:72%StarStarStarStar
Examples:69%StarStarStarStar
Tests:-
Videos:-
Overall:56%StarStarStar
Rank:1711
 
I love this script, Thanks very much
9 years ago (Nguyen Van Ngan)
75%StarStarStarStar
Has the basics.
9 years ago (Tom Carnevale)
62%StarStarStarStar
doesn't work
11 years ago (John Smith)
0%Star
 

For more information send a message to info at phpclasses dot org.