Public Function Issuspage ($MAP)
{
Import ("ORG. Util.page ");//Import page-out class
$count = M (' app_config ')->count ();//query satisfies the required total number of records
echo " -00--". $count;
$Page = new Page ($count, 10);
echo " -0--". $Page;
$data = M (' app_config ')->where ($map)->limit ($Page->firstrow. ', '. $Page->listrows)->select ();
$this->assign (' page ', $show);//Assignment Paging output
$this->assign ($_post);
$this->assign ("Data", $data);
$this->display (' AppConfig ');
}
The resulting results are:
-00--21
-0--
Why can't I get the $Page value? Everybody help, hurry Ah
\www\thinkphp\extend\library\org\util
There is a Page.class.php file in this location in the folder.
Reply to discussion (solution)
$Dao = M ("User");
Total calculation
$count = $Dao->count ();
Import page-Out class
Import ("ORG. Util.page ");
Instantiating a paging class
$p = new Page ($count, 10);
Pagination Display output
$page = $p->show ();
Current page data query
$list = $Dao->order (' id desc ')->limit ($p->firstrow. ', '. $p->listrows)->select ();
Assignment Value Assignment
$this->assign (' page ', $page);
$this->assign (' data ', $list);
$this->display ("index");