Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result res,该怎么解决
程序员文章站
2024-02-14 15:39:52
...
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result res
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/www/web/vipcha.net_aFKgRRM1uWJpHqxlIBez/wwwroot/cy/view.php on line 9
require_once("checkpostandget.php");
require_once("global.php");
//$ID=intval($_GET['id']);
$iD = intval(base64_decode($_GET['iD']));
$query="select * from chengyu where ID =".$ID."";
$result=mysql_query($query);
while ($rs = mysql_fetch_object($result)){
?>
while ($rs = mysql_fetch_object($result)){ //第9行
------解决方案--------------------
ID、iD、id。。先把变量名称的大小写都写对了再说。
------解决方案--------------------
$query="select * from chengyu where ID =".$ID.""; 中
$ID 没有值
------解决方案--------------------
很明显是mysql_query没有值,mysql_query没有值,有可能是$query语句有错误。$query没有错误,说明$ID不正确。
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/www/web/vipcha.net_aFKgRRM1uWJpHqxlIBez/wwwroot/cy/view.php on line 9
require_once("checkpostandget.php");
require_once("global.php");
//$ID=intval($_GET['id']);
$iD = intval(base64_decode($_GET['iD']));
$query="select * from chengyu where ID =".$ID."";
$result=mysql_query($query);
while ($rs = mysql_fetch_object($result)){
?>
while ($rs = mysql_fetch_object($result)){ //第9行
------解决方案--------------------
ID、iD、id。。先把变量名称的大小写都写对了再说。
------解决方案--------------------
$query="select * from chengyu where ID =".$ID.""; 中
$ID 没有值
------解决方案--------------------
很明显是mysql_query没有值,mysql_query没有值,有可能是$query语句有错误。$query没有错误,说明$ID不正确。
相关文章
相关视频
推荐阅读
-
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result res,该怎么解决
-
mysql_fetch_array(): supplied argument is not a valid MySQL result resource,该怎么解决
-
mysql_fetch_row(): supplied argument is not a valid MySQL result resource,何人能解?该如何解决
-
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result res,该怎么解决
-
mysql_fetch_row(): 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,该怎么解决
-
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resour,该怎么解决
-
php出现Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result解决办法