Home > Backend Development > PHP Tutorial > thinkphp3.2分页内容不显示解决方法

thinkphp3.2分页内容不显示解决方法

WBOY
Release: 2016-06-13 12:02:24
Original
1328 people have browsed it

thinkphp3.2分页内容不显示
$count=$User->count();
$page=new \Think\Page($count,1);
//dump($page);
$show = $page->show();//分页显示输出
$orderby['id']='desc';
$list = $User->order($orderby)->limit($page->firstRow.','.$page->listRows)->select();
dump($list);
$this->assign('list',$list);
$this->assign('page',$show); 
分页的效果出来了     如:   123 >>    
 但是html数据不显示是怎么回事、?? 然后我dump($list) 返回给我boolean false。。。。
新手一枚 网上都没有类似问题 是我在html读取的数据不对么 我用这个读的。。
 求指导  感谢
------解决方案--------------------
目测没有什么错误,你打印出sql语句看看是啥,并在mysql中执行一下
------解决方案--------------------
把你的sql语句在sql里面跑一下是否能成功,不成功的话肯定没数据
------解决方案--------------------
感觉是你mysql查询语句不对导致查不到数据导致。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template