收到此警告:mysqli_query():无法在第6行的/home/u443228523/public_html/easy.php中获取mysqli
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']." </span>
<p style='margin:0; padding:0;'>
".$row['url']." <br/> </a>
</p>
</div>
</li>";
}
echo "</ol>
</form>";
?>
有人可以解释我为什么吗?可以在数据库设置上吗?
在conexion.php上宣布BTW $ oreo。
答案 0 :(得分:0)
你的mysqli_query()不输出结果对象。检查$ conn和您的查询。