运行以下代码后出现错误:Fatal error: Call to a member function execute() on a non-object 求大神解决 5
@$db=newMySQLi("localhost","root","","bookorama");if(mysqli_connect_errno()){echo"Err...
@$db=new MySQLi("localhost","root","","bookorama");
if(mysqli_connect_errno()){
echo "Error:Could not coonect to database.Please try again later";
exit;
}
$query="insert into books values(?,?,?,?)";
$result=$db->prepare($query);
$result=$result->bind_param("sssd",$isbn,$author,$title,$price);
$result->execute(); 展开
if(mysqli_connect_errno()){
echo "Error:Could not coonect to database.Please try again later";
exit;
}
$query="insert into books values(?,?,?,?)";
$result=$db->prepare($query);
$result=$result->bind_param("sssd",$isbn,$author,$title,$price);
$result->execute(); 展开
1个回答
2013-01-22
展开全部
致命错误:调用一个非对象的成员函数execute()
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询