Home  >  Article  >  Backend Development  >  Warning: mysql_fetch_row() expects parameter 1 to be resource解决方案

Warning: mysql_fetch_row() expects parameter 1 to be resource解决方案

WBOY
WBOYOriginal
2016-06-13 10:08:211260browse

Warning: mysql_fetch_row() expects parameter 1 to be resource
include("conn.php");
?>



$sql="select * form message";
$query=mysql_query($sql,$con);
if (!$sql) { 
// add this check.  
die("Error running $sql: " . mysql_error()); } 
while($row=mysql_fetch_row($query)){ 
?>
 
 
 
 
 
 
 

  ?>
标题:
  用户:
内容:

为什么会出现Warning: mysql_fetch_row() expects parameter 1 to be resource

------解决方案--------------------
你的连接是否正确,还有你可以打印的你的sql语句看看。
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