网站\ adduser.php可能是什么问题?致命错误:调用一个成员函数布尔用C的execute(): XAMPP htdocs中上线42
function db(){
$con= new mysqli('localhost' , 'root','','signupsystem') or die("fail". mysqli_connect_error());
$queryb="Insert into adduser(name,fathername,gender,address,cnic,contactnumber,email,password) values($this->name,$this->fathername,
$this->gender,$this->address,$this->cinic_no,$this->contact_n0, $this->email , $this->password)";
$result = $con->query($queryb);
if (!$result) {
die($con->error);
}
$stmt = $con->prepare($queryb);
if($stmt === "false")
{
trigger_error('Wrong Sql:' . $queryb . ' Error ' . $this->con->error, E_USER_ERROR);
}
$stmt->execute();
$af = $stmt->affected_rows;
$con->close();
return $af;
}
用'FALSE'比较,而不是“false”。 –
变化虚假的错误occour 后“您的SQL语法错误;检查对应于您的MariaDB的服务器版本使用附近的正确语法手册‘6110197860375,03414216670,[email protected],)’在列2“ – Mudassar
确切地说,现在看看你的SQL并修复那个错误。 –