PHP Classes

File: examples/store_page.php

Recommend this page to a friend!
  Classes of Everton da Rosa   XtPHP   examples/store_page.php   Download  
File: examples/store_page.php
Role: Example script
Content type: text/plain
Description: Example script
Class: XtPHP
General purpose library of utility classes
Author: By
Last change:
Date: 9 years ago
Size: 502 bytes
 

Contents

Class file image Download
<?php

require '../store.php';
require
'../utils.php';
require
'../mysql.php';

XtMysql::connect('localhost', 'root', 'lise890', 'information_schema');

$result = XtMysql::qry("select * from collations");

$store = XtStore::fromMysql($result);

echo
"<p>".XtStore::pages($store, 20)." páginas no total.</p>";//exibe o total de páginas, considerando 20 linhas por página

$pagina = XtStore::page($store, 2, 20);//retorna a página 2 sendo cada página com 20 registros

XtUtils::printr($pagina);

?>