我认为第二个参数是传递参数绑定到查询.
如果服务器允许你一次执行两个sql语句,这可能会有效.(在每个查询的末尾添加了一个终止分号,并将两个查询连接在一起作为一个字符串.)
$sql = "INSERT INTO images (path, useremail, approved, flagged,caption,date) VALUES ('$target','$email',0,0, '$caption','$b');"; $sql1 = "INSERT INTO users (name, email, phone) VALUES ('$peoplename','$email','$phone');"; $conn->execute($sql . $sql1);
否则显而易见
$conn->execute($sql); $conn->execute($sql1);