我有以下php代码
$riziv = $_GET["riziv"];
$answer1 = (int)$_GET["answer1"];
$answer2 = (int)$_GET["answer2"];
$name = $_get["name"];
$first_name = $_get["first_name"];
$city = $_get["city"];
if (empty($riziv)) {
$stmt = $this->db->prepare("INSERT INTO Doctors
(name,first_name,city,answer1,answer2)
VALUES (?,?,?,?,?)");
$stmt->bind_param("sssdd",$name,$first_name,$city,$answer1,$answer2);
}else{
$stmt = $this->db->prepare("UPDATE Doctors SET answer1 = ?, answer2 = ? WHERE riziv=?");
$stmt->bind_param("dds",$answer1,$answer2,$riziv);
}
$stmt->execute();
$stmt->close();
$this->db->commit();
更新正在运行但是bind_param行上的插入是否中断? 有人可以帮忙吗?
谢谢!