PHP Classes

PHP PDO Pagination: Show links to browse paginated PDO query results

Recommend this page to a friend!
  Info   Videos Videos   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (2 months ago) RSS 2.0 feedNot enough user ratingsTotal: 565 This week: 1All time: 5,412 This week: 560Up
Version License PHP version Categories
pdo-pagination-php 1.10BSD License5.0HTML, PHP 5, Databases
Description 

Author

This class can show links to browse paginated PDO query results.

It can execute a database query using a connection established with PDO to obtain the total number of results in a given SQL query.

The class generates a SQL statement suffix to append to the query in order to get only the records to display on the current page assuming a given limit of records to be displayed per page.

It can also generate HTML to go to next, previous, first, last and intermediate pages of the database results listing pages.

Picture of manudg
  Performance   Level  
Name: manudg <contact>
Classes: 6 packages by
Country: Spain Spain
Age: 43
All time rank: 159033 in Spain Spain
Week rank: 411 Up13 in Spain Spain Up

Details

PDO_Pagination ============== <h4>English description:</h4> This class can show links to browse paginated PDO query results. It can execute a database query using a connection established with PDO to obtain the total number of results in a given SQL query. The class generates a SQL statement suffix to append to the query in order to get only the records to display on the current page assuming a given limit of records to be displayed per page. It can also generate HTML to go to next, previous, first, last and intermediate pages of the database results listing pages. The class allow modified the CSS style for the HTML links, through CSS classes. The value of the GET parameters have been filtered to accept only numbers, if you add new parameters GET, it is your responsibility to validate to prevent SQL injection. <H5>DEMOSTRATION</H5> Save the folder in your project site. Install in your database the code from demo.sql and you edit the connection config in the file demo.php. Finally, execute <strong>demo.php</strong> in your browser. View video demo ... http://www.youtube.com/watch?v=kKCferOfaOc <h4>Descripción en español:</h4> PDO_Pagination es una clase php para crear resultados de paginación con consultas a base de datos mediante la extensión PDO. La consulta genera en el HTML los links para ir navegando a través de las páginas siguientes, anteriores, en primer lugar, últimos e intermedios. La clase proporciona una serie de propiedades que permiten agregar clases CSS para modificar los estilos de los links. Puedes agregar parámetros opcionales a la consulta como se muestra en el archivo de ejemplo demo.php, el filtrado de esos datos es tu responsabilidad, si bien los parámetros que maneja la clase ya han sido filtrados para aceptar tan sólo números. <h5>DEMOSTRACIÓN</h5> Guardar la carpeta en el sitio de tu proyecto. Instala en tu base de datos el código de demo.sql y editar la conexión en el archivo demo.php. Finalmente ejecuta <strong>demo.php</strong> en el navegador. Ver vídeo demo ... http://www.youtube.com/watch?v=kKCferOfaOc

  Files folder image Files  
File Role Description
Files folder imagePDO_Pagination (4 files)
Accessible without login Plain text file AUTHORS.txt Doc. Documentation
Accessible without login Plain text file LICENSE Data Auxiliary data
Accessible without login Plain text file README.md Data Auxiliary data

  Files folder image Files  /  PDO_Pagination  
File Role Description
  Accessible without login Plain text file demo.php Example Example script
  Accessible without login Plain text file demo.sql Data Auxiliary data
  Plain text file PDO_Pagination.php Class Class source
  Accessible without login Plain text file README.md Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:565
This week:1
All time:5,412
This week:560Up