<?php
$dbCon2=mysqli_connect("localhost", "root", "", "dbusers")
or die(mysql_error()."Connection disconnected");
$sql1 = "SELECT * FROM users";
$sql2 = mysqli_query($dbCon2, $sql1);
while($row = mysql_fetch_array($sql2))
{
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 是资源,给定对象