Same page I have two tables that need paging, my little brother. I have a problem when I instantiate the same paging class.

Source: Internet
Author: User
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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.