我编写了一个sql查询,用于编辑php文件中给定表上的元组。但是查询不会运行。代码如下:
<?php include("dbconfig.php");
$memberID = $_GET['memberID'];
$MFirst= $_GET['MFirst'];
$MLast = $_GET['MLast'];
$Street = $_GET['Street'];
$number = $_GET['number'];
$postalCode = $_GET['postalCode'];
$Mbirthdate = $_GET['Mbirthdate'];
$sql="UPDATE member SET MFirst=$MFirst WHERE memberID=$memberID";
$result = mysqli_query($conn,$sql);
//redirecting to the display page (borrows_table.php in our case)
//header("Location:member_table.php");
?>
memberID,MFirst等的值是正确的,所以我找不到这里的问题。