我有这个代码。出于某种原因,当我显示 html 时,它不会显示 id 列的值。有一列,但其中没有值。在 mysql 表中,共有三列:“id”、“username”和“password”。有谁能够帮助我?
include "Connector.php";
$query = "SELECT id, username, password FROM users";
$result = mysql_query("SELECT username, password FROM users") or die ("MySQL error: " .mysql_error());
echo "<table>";
while($row = mysql_fetch_array($result)){
echo "
<tr>
<td>"
.$row['id'].
"</td>
<td>"
.$row['username'].
"</td>
<td>"
.$row['password'].
"</td>";
echo "<td><a href='deleteRow.php?oId=".$row[password]."'>Delete</a></form></td>
</tr>";
}
echo "</table>";
mysql_free_result($result);
mysql_close($connection);