Home  >  Article  >  Backend Development  >  提示小弟我<php while ($myrow=mysql_fetch_array($result)){ 这里出错了,但小弟我不知道这里有什么错了?求高手解答

提示小弟我<php while ($myrow=mysql_fetch_array($result)){ 这里出错了,但小弟我不知道这里有什么错了?求高手解答

WBOY
WBOYOriginal
2016-06-13 12:33:411006browse

提示我



无标题文档




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);
}
?>


  
    
    
    
     
   while ($myrow=mysql_fetch_array($result)){ //使用while循环输出查询结果
?>
  
       
    
    

     } //结束while循环
?>
新闻标题 新闻内容 编辑

if($page!=1){
echo "首页";
echo "上一页";
}
if($page echo " 下一页";
echo " 尾页";
}
?>


php+mysql
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