Same page I have two tables that need paging, and I have a problem when I instantiate the same paging class.
I have two tables on the same page, all need pagination, I have a paging class, two tables have instantiated this class, but after the page is a problem, there is no data, why this?
This is how I instantiate:
The first table:
$my _page1=new pageclass ($total 1,20,$_get[' page '], '? account= '. $_session[' account ']. ' &act=wyxx&page={page} ');
The second table:
$my _page2=new pageclass ($total 2,20,$_get[' page '], '? account= '. $_session[' account ']. ' &act=blnr&page={page} ');
The paging class is like this:
Class Pageclass
{
Private $myde _count; Total Record Count
Public $myde _size; Number of records per page
Private $myde _page; Current page
Private $myde _page_count; Total pages
Private $page _url; Page URL
Private $page _i; Start Page
Private $page _ub; End Page
Public $page _limit;
function __construct ($myde _count=0, $myde _size=1, $myde _page=1, $page _url)//constructors
{
$this->myde_count= $this->numeric ($myde _count);
$this->myde_size= $this->numeric ($myde _size);
$this->myde_page= $this->numeric ($myde _page);
$this->page_limit= ($this->myde_page * $this-myde_size)-Myde_size, $this; Start record on next page
$this->page_url= $page _url; The address of the connection
if ($this->myde_page<1) $this->myde_page=1; When the current page is less than 1, the value is assigned a value of 1
if ($this->myde_count<0) $this->myde_page=0;
$this->myde_page_count=ceil ($this->myde_count/$this->myde_size);//Total pages
if ($this->myde_page_count<1)
$this->myde_page_count=1;
if ($this->myde_page> $this->myde_page_count)
$this->myde_page= $this->myde_page_count;
$this->page_i= $this->myde_page-2;
$this->page_i= $this->myde_page-2;
$this->page_ub= $this->myde_page+2;
$this->page_ub= $this->myde_page+2;
if ($this->page_i<1) $this->page_i=1;
if ($this->page_ub> $this->myde_page_count) {$this->page_ub= $this->myde_page_count;}
}
Private function numeric ($id)//Determine if it is a number