- Has been a member for 2-3 years
- Helped protect Envato Marketplaces against copyright violations
- Exclusive Author
- Sold between 1 and 100 dollars
- Bought between 10 and 49 items
- United States
- Referred between 10 and 49 users
live preview is down….
live preview is down….
As with pretty much every single one of these on Codecanyon, you need to prevent a user entering -100 or some other random number.
But otherwise, this is actually a very nice script, and good job 
Not exactly. Class correctly validate the data and when you specify an invalid value, pagination will not be displayed. This is a normal situation, because “class” doesn’t know which rows range have to be displayed and which data set was previously displayed. It was assumed that the user provide the correct data (in constructor). If the application’s logic is violated (as in this case) the function returns false.
Thank you for your comment.
Any documentation on how to use this with MySQL data in PHP ? I’m a beginner, so as simple as possible would be very nice 
words aren’t showing up for “Last” and Previous” buttons
so, it took me a second but i figured it out, for everyone out there that was wondering the same thing, you need to include the “language” folder where ever the script is going to be. Inside that folder you need the language xml file, the default is “en.xml” to make sure the path to this file is correct, go to the “Pagination.php” in the class folder, on line 32 you will find ”$pathToLanguageFile=’../language/’” – I had to reset this to ”$pathToLanguageFile=’../language/’” for my path to be correct. This wasn’t described correctly in the documentation. The documentation says “To correctly use the language file, it is necessary to give it a name in the format: xx.en where xx is the name of the language.” what he meant was “To correctly use the language file, it is necessary to give it a name in the format: xx.xml where xx is the name of the language. (in the working example, this file is en.xml)” This script is awesome, thanks alot, hopes this helps.
hi there!
newbie here
can you give me a quick tut on how to implement this with a sql record set? I just dont “get it”...
thanks!
Hello silverspring,
Example of the use of pagination with MySQL database can be found at: http://dhost.info/quanticalabs/Pagination/demo/#menu6
Hi can I use this in a WordPress based site? Regards,
Have purchase the script but the Example of the use of pagination with MySQL database not work i get Fatal error: Class ‘Pagination’ not found in /home/aannemer/public_html/Pagination/index.php on line 69
The script dont not create the pagination but only the database results // create pagination $Pagination=new Pagination($p,$totalResults,$perPage); $Pagination->setParameters(array(‘id’=>‘MySQLExample’,’pageName’=>‘p’)); $Pagination->create();
<? My database conection $username = “aannemer”; $password = “password”; $hostname = “localhost”; $database = “aannemer”; // set the number of results per page
$perPage=5;
// “p” is the name of the variable that stores the page number
$p=(int)$_GET[‘p’]<=0 ? 1 : (int)$_GET[‘p’];
// database connection
if(($connection=mysql_connect($hostname, $username, $password))===false) die(); if((mysql_select_db($database,$connection))===false) die();
// execute main query
$mainQuery=’select SQL _CALC_FOUND_ROWS * from My database tabel limit ’.(int)($perPage*($p-1)).’,’.(int)$perPage; if(($mainResult=mysql_query($mainQuery,$connection))===false) die();
// if there are any records, then create a table
if(mysql_num_rows($mainResult)) { // execute the helped query that calculates the number of all results ?>
| <? echo $mainRow[‘id’]; ?> | <? echo $mainRow[‘name’]; ?> | <? echo $mainRow[‘surname’]; ?> | <? echo $mainRow[‘email’]; ?> | <? echo $mainRow[‘balance’]; ?> |
$helpRow=mysql_fetch_assoc($helpResult);
$totalResults=$helpRow['totalResults'];
// create pagination
$Pagination=new Pagination($p,$totalResults,$perPage);
$Pagination->setParameters(array('id'=>'MySQLExample','pageName'=>'p'));
$Pagination->create();
}
?>
Hello sane,
If you got error like “Class ‘Pagination’ not found in ..” it means that you don’t include class file or the file is missing etc. Please add this line before you create pagination object:
require_once('../class/Pagination.php');
Of course the path is depends where you install the script.
Realy confusing manual included in pack. Can you made something more easy for people who dont have php programming in small finger?
i sent you email…
Thank you for quick response! 
In the pagination.css file you have “background-image:url(’../graphics/arrowRightField.png’);” but in the download package there is no such file for arrowRightField.png.
One more issue I have.
The Next, Last, First, previous buttons are not showing up within the pagination.
Any clue as to why this would happen? Am I missing something? Does this have issues with Jquery 1.5.1?
http://www.orlandohyundaicertified.com.php5-20.dfw1-2.websitetestlink.com/inventory.php
go to the very bottom of the page and you will see what I’m talking about.
Did you get my email about the pagination being setup exactly like yours was on the site? I sent a screenshot in hopes of you responding.
Can be used with ajax? I saw in parameters that can use ajax. Is there an example how to do this?
Getting errors about undefined index on lines 106/7
Hello, it’s me again 
How would you go about adding Ajax to this, I enabled the ajax param, but is there any function you can use jQuery to hook into?
I also get error about “use of undefined constant id – assumed ‘id’”
Thanks!
Hi Just a couple of questions: 1. Do you have an example of the pagination class working with an image stored in the database as well as queried text? 2. Did you manage to work this with AJAX yet – is there a sample? The script looks awesome and I am excited about purchasing (especially if point 1 is available) Thanks
Greetings, I have some of the same issues as described earlier. I am missing graphics/arrowRightField.png
http://i53.tinypic.com/30tku1t.pngThe whitespace between the buttons, is that the missing file?
I have been following the MySQL Example in the documentation.
COPYRIGHT © 2012 ENVATO| TERMS OF USAGE| SUPPORT/HELP| ICONS BY TANGO + WEFUNCTION + FAMFAMFAM
Adobe®, Flash®, Flex®, Fireworks®, Photoshop®, Illustrator®, InDesign® and After Effects® are registered trademarks of Adobe Systems Incorporated.
101 Purchases
19 Comments