-1

'我收到这个警告:mysqli_query(): Couldn't fetch mysqli in /home/u443228523/public_html/easy.php on line 6

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in /home/u443228523/public_html/easy.php on line 12 

从这段代码:

<?php 


// perform the query and store the result

$result = mysqli_query($conn,"SELECT * FROM library, crime_data WHERE crime_data.id=$oreo AND crime_data.isbn=library.isbn AND crime_data.visibility='0'");

echo "<iframe src='demo.html' name='fool_iframe' id='fool_iframe' style='visibility:hidden; display:none;'></iframe>
    <form method='post' action='delete.php' name='erradica'>";

echo "<ol id='printy'>";
while($row = mysqli_fetch_array($result))
  {

  echo "<li class='daitems'>
<div class='label'>

<a href='".$row['url']."' target='_blank'><img src='". $row['src'] . "'  width='20' height='30' alt='".$row['title']."' style='float:left'></a>
<a href='delete.php?id_line2=".$row['url']."' onClick='JavaScript:timedRefresh(500);' target='fool_iframe' style='float:right;'><img src='images/close_window.png'></a>
<a href='".$row['url']."' target='_blank' class='sec_par'><span id='title33'>".$row['title']."&nbsp;</span>
<p style='margin:0; padding:0;'>
".$row['url']."&nbsp;<br/> </a>
</p> 
</div>
</li>";
  }
echo "</ol>
</form>";

?>

有人可以解释我为什么吗?可以在数据库设置上吗?

顺便说一句,在 conexion.php 上声明了 $oreo。

4

1 回答 1

0

您的 mysqli_query() 不输出结果对象。检查 $conn 和您的查询。

于 2013-09-25T14:45:07.830 回答