phpe/cpaging

Classes for Paging

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:HTML

v1.0 2015-02-16 14:24 UTC

This package is not auto-updated.

Last update: 2025-07-09 10:36:57 UTC


README

A class for implementing paging

About

A very light and simple class that implement paging with mySql.

PHP 5 >= 5.3.0

Introduction

First instantiate a paging object like $paginering = new \phpe\paginering\CPaginering(); Count ever item in your SQL table eg, "SELECT * FROM VFullViewMovies". Then wirte your SQL query, eg "SELECT * FROM VFullViewMovies WHERE genre = action LIMIT ".$_GET['hits']." OFFSET ".(($_GET['page'] - 1) * $_GET['hits'])."

Then set $paginering->setTotalRows($_GET['hits'], $_GET['page'], count($AllTableItems));

You will then get the html code with: $paginering->GetPageNav(); $paginering->GetNbrOfHitsPerPage();

Scrutinizer Code Quality Code Coverage Build Status