Public Function trends () {
$showtrends = M (' Trends ');
Import (' ORG. Util.page ');
$showscount = $showtrends->count ();
$Page = new Page ($trendscount, 3);
$show = $Page->show ();
$list = $showtrends->limit ($Page->firstrow. ', '. $Page->listrows)->select ();
$this->assign (' Trends ', $list);
$this->assign (' page ', $show);
Dump ($show);
Exit ();
$this->display ();
}
Pagination effect can come out, but pagination page number does not show, dump ($show) data is empty, what's going on?
Reply to discussion (solution)
What time do you use the TP system? If it is new then your import is invalid, because the newest one uses the namespace.
What time do you use the TP system? If it is new then your import is invalid, because the newest one uses the namespace.
I use 3.1 of, but in the other controller can achieve fuzzy paging query, here is not
The other one can, but it can't be.
Obviously you have something wrong! If there is no problem with the process, the parameters are incorrect. What's more, is the template
Use TP to provide the function, just press his format to go, there is nothing to debug the place (Fool way)
Take this $Page = new Page ($trendscount, 3);
Change to $Page = new Page ($showscount, 3);
Take this $Page = new Page ($trendscount, 3);
Change to $Page = new Page ($showscount, 3);
Oh, yes, the variables are wrong, thanks, huh?