<?php
$sql = mysql_query("SELECT * FROM users;");
while($row = mysql_fetch_array($sql))
{
$dbCon=mysqli_connect("localhost", "root", "", "dbusers")
or die(mysqli_error()."Connection disconnected");
echo "<tr>";
echo "<td>" . $row['UserID'] . "</td>";
echo "<td>" . $row['Firstname'] . "</td>";
echo "<td>" . $row['Lastname'] . "</td>";
echo "<td>" . $row['Gender'] . "</td>";
echo "<td>" . $row['Email'] . "</td>";
echo "<td>" . $row['Status'] . "</td>";
echo "<td>" . $row['Date_joined'] . "</td>";
echo "</tr>";
}
?>
- 我的代码有什么问题?
这是我总是得到的错误:警告:mysql_fetch_array() 期望参数 1 是资源,在第 4 行的 C:\xampp\htdocs\CRUD\CRUD_Act\includes\dbdisp.php 中给出的布尔值