我花了超过 24 小时试图在选择查询之后运行更新或插入查询,但选择查询完成并且更新或插入查询在提交“displayid”时从未完成
代码##
if($_POST["displayid"]==TRUE) {
$sqlid = "SELECT * FROM doc1 WHERE idnum ='$pidnum' AND stats='$ok'";
$result = mysqli_query($conn, $sqlid);
if (mysqli_num_rows($result) > 0) {
$sqlup = "UPDATE doc1 SET m_phone='$pmphone', seen='$dataseen' WHERE idnum ='$pidnum'";
mysqli_query($conn, $sqlup);
$found=1;
}
else {
$found=0;
$sqlfail="INSERT INTO fail(fname,lname,tname,funame,idnum,m_phone,reg_date) VALUES('$pfname','$plname','$ptname','$pfuname','$pidnum','$pm_phone','$todaydate')";
$conn->query($sqlfail);
}
}