提示我<?php while ($myrow=mysql_fetch_array($result)){ 这里出错了,但我不知道这里有什么错了?求高手解答?
WBOY
Release: 2016-06-23 14:26:55
Original
998 people have browsed it
php+mysql
无标题文档
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); } ?>
回复讨论(解决方案)
求高手解答。。。为什么会出现这个
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in E:\wamp\www\wuliupeisong\admin\edit_news.php on line 41
$query="select * from tb_user where id order by id desc limit $offset, $page_size"; //标红处有问题吧?
噢噢,非常谢谢你
$query="select * from tb_user where id order by id desc limit $offset, $page_size"; //标红处有问题吧?
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