我有一个汽车数据库,为每个模型存储几辆汽车,我正在尝试检索特定型号的所有汽车,但是我的代码无效,我哪里出错?
$ModelID = $_GET['model_id'];
$result = mysqli_query($con, "SELECT * FROM Car WHERE ModelID = $ModelID");
while($row = mysql_fetch_assoc($result))
{
echo $row["RegNumber"];
echo $row["Colour"];
}