Home  >  Article  >  Backend Development  >  thinkphp3.2分页内容不显示

thinkphp3.2分页内容不显示

WBOY
WBOYOriginal
2016-06-23 13:53:451254browse

$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查询语句不对导致查不到数据导致。

感觉是你mysql查询语句不对导致查不到数据导致。



找到错误了 是我改了数据库标签名  所以数据没显示出来  感谢

目测没有什么错误,你打印出sql语句看看是啥,并在mysql中执行一下


找到错误了 是我改了数据库标签名  所以数据没显示出来  感谢



把你的sql语句在sql里面跑一下是否能成功,不成功的话肯定没数据


找到错误了 是我改了数据库标签名  所以数据没显示出来  感谢
Statement:
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
Previous article:php全等()Next article:新手求教下 PHP PEAR DB 的问题