-2
警告:mysqli_fetch_array()预计参数1被mysqli_result,在C中给出布尔:\瓦帕\ WWW \ view.php线路28上布尔其中mysqli_result预计
是我得到的警告当我用下面的代码的PHP版本5.4.3:
<?php
$db_conx = mysqli_connect("localhost", "ian", "tao", "ianrusse_database");
$result=mysqli_query($db_conx,"SELECT * FROM accounting personnel
ORDER BY NAME");
{
echo "<table border='1'>
<tr>
<th>Name</th>
<th>Middle Name</th>
<th>Surname</th>
<th>Area Assignment</th>
<th>Gender</th>
<th>Date Hired</th>
<th>Position</th>
<th>Image</th>
</tr>";
}
echo "</table";
while ($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['NAME'] . "</td>";
echo "<td>" . $row['MIDDLE_INITIAL']."</td>";
echo "<td> " . $row['SURNAME'] ."</td>";
echo "<td> " . $row['AREA_ASSIGNMENT'] ."</td>";
echo "<td> " . $row['GENDER'] ."</td>";
echo "<td> " . $row['CIVIL_STATUS'] ."</td>";
echo " <td>" . $row['DATE_HIRED'] ."</td>";
echo "<td> " . $row['POSITION'] ."</td>";
echo "<td> " . $row['AVATAR'] ."</td>";
echo "</tr>";
}
// if
// ($result == $mysqli_query) {
// echo "good job";
// }
echo "good job";
echo "</table>";
mysqli_close($db_conx);
?>
什么是问题? – null
您的sql无效,这就是为什么你得到这个错误,但这是没办法问一个关于SA – havardhu
的问题这可能是mysql和php标签中最常见的问题之一,我敢肯定你有一个在撰写问题时提供一系列建议 –