提示小弟我<php while ($myrow=mysql_fetch_array($result)){ 这里出错了,但小弟我不知道这里有什么错了?求高手解答
WBOYOriginal
2016-06-13 12:33:411044browse
提示我
无标题文档
include("conn/conn.php"); //包含conn.php文件
if (isset($_GET['page'])){
$page=$_GET['page'];
}else{
$page=1;
}?>
if($page){
$page_size=4; //每页显示4条记录
$query="select * from tb_news"; //定义查询语句
$result=mysql_query($query); //执行查询操作
$message_count=mysql_num_rows($result); //获取查询总数
$page_count=ceil($message_count/$page_size); //获取总的页数
$offset=($page-1)*$page_size;
$query="select * from tb_user where id order by id desc limit $offset, $page_size";
$result=mysql_query($query);
}
?>
php+mysql
分享到: ------解决方案-------------------- $query="select * from tb_user where id order by id desc limit $offset, $page_size"; //标红处有问题吧?
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