<?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是資源,鑑於對象PHP連接數據庫:檢索記錄
如果有任何問題的答案以下解決了您的問題,請考慮通過點擊您的向下箭頭中勾選的複選標記來接受它們。這樣做不僅可以幫助他們,還可以通過授予聲譽來幫助您。 – Daedalus