我不太确定我做错了什么。我正在尝试使用此代码删除整行,但它不起作用。没有发生错误,它会打印它被删除的行,但是当我去看看它不工作时。有什么想法吗?
<?
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("theobse1_scores", $con);
$sql="DELETE FROM times WHERE id='$id'";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record deleted go back to delete another!";
mysql_close($con)
?>