mysql_fetch_array(): supplied argument is not a valid MySQL result resource
程序员文章站
2022-05-10 18:54:27
...
php 无效sql结果资源 mysql
江苏农二代农林生态发展有限公司
include "conn/conn.php";
?>
?>
错误信息
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Apache\htdocs\growers\news.php on line 147
include "conn/conn.php";
?>
?>
|
|
错误信息
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Apache\htdocs\growers\news.php on line 147
回复讨论(解决方案)
$sql = mysql_query("select * from frontpagenews where identification = ".$_GET['identification']." order by createDate desc limit 0,7");
mysql_query("select * from frontpagenews where identification = ".$_GET['identification']. "order by createDate desc limit 0,7");
除非 $_GET['identification'] 最后的字符是空格,不然 $_GET['identification'] 的值不就和 order 连在一起了?
如果 $_GET['identification'] = 1
你的 sql指令不就了
"select * from frontpagenews where identification = 1order by createDate desc limit 0,7"
吗?
粗心要人命啊。多谢了。少个空格
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
相关文章
相关视频
推荐阅读
-
php错误提示: mysql_fetch_row(): supplied argument is not a valid MySQL
-
mysql_fetch_row(): supplied argument is not a valid MySQL result resource,何人能解?该如何解决
-
为何总是Warning: mysql_fetch_object(): supplied argument is not a valid MySQL resul
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource,该如何处理
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource....
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource....
-
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result res,该怎么解决
-
php出现Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result解决办法
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource,该怎么解决
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource