当试图从mysql数据库中提取数据时,我什么都没得到。
只是简单地“ID:”
代码:
<?php
require 'db/connect.php';
$query = "SELECT * FROM offenses";
$result = mysqli_query($db, $query);
while($row=mysqli_fetch_array($result));{
echo "<br />";
echo "ID : ". $row['id'];
}
mysqli_close($db);
?>
答案 0 :(得分:0)
从;
while($row=mysqli_fetch_array($result));
答案 1 :(得分:0)
您必须从while语句中删除;
while($row=mysqli_fetch_array($result)){
echo "<br />";
echo "ID : ". $row['id'];
}