这真让我烦恼,我希望你们中的一个可以帮助我。我的主页不断向我显示此消息: -
警告:mysqli_fetch_assoc()要求参数1为mysqli_result,在第17行的/Users/rosshills/Sites/widget_corp/public/manage_content.php中给出为null
警告:mysqli_free_result()要求参数1为mysqli_result,在第45行/Users/rosshills/Sites/widget_corp/public/manage_content.php中给出null
我不知道为什么它会给我这个警告。这是第17行的括号中的内容。 (从第8行到第22行)
<php
$query = "SELECT * ";
$query .= "FROM subjects ";
$query .= "WHERE visible = 1 ";
$query .= "ORDER BY position ASC";
$subject = mysqli_query($connection, $query);
confirm_query($subject_set);
?>
<?php
while($subject_set = mysqli_fetch_assoc($subject_set)) {
?>
<li>
<?php echo $subject["menu_name"] . " (" .
$subject["id"] . ")"; ?>