为什么此sql查询不能在php中运行?

时间:2019-05-22 16:47:36

标签: javascript php html mysql

我编写了一个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等的值是正确的,所以我找不到这里的问题。

0 个答案:

没有答案
相关问题