首頁  >  文章  >  後端開發  >  Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resour,该怎么解决

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resour,该怎么解决

WBOY
WBOY原創
2016-06-13 10:48:091292瀏覽

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resour
mysql_connect("localhost","root","liubing");
mysql_select_db("text");
$sql=@"seclet * from 'bing2'" or die("失败");
if($sql) echo "成功";
$query=mysql_query($sql);
echo $query;
$rsa=mysql_fetch_row($query);
print_r ($rsa);
?>

报错内容:Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in E:\AppServ\www\bingbing\lianxi\aa.php on line 16
求回复

------解决方案--------------------
$sql=@"select * from bing2" or die("失败");

$query=mysql_query($sql) or die(mysql_error());

这样试试还报错吗

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn