【ERROR_2】Call to a member function bind_param() on a non-object

When I was using MySQli prepared today, I encountered the following error:
 
 
 
Fatal error: Call to a member function bind_param() on a non-object in …
 
The error statement for the report is:
$prepareQuery-> bind_param(“sssd”,$isbn,$author,$title,$price);
 
— Error reasons:
$query=”insert into boks values(?,?,?,?) “;
$prepareQuery=$db-> prepare($query);
$prepareQuery-> bind_param(“sssd”,$isbn,$author,$title,$price);
 
The name of the table Boks is wrong. It should be books
 
So: when encountering an error like this, you should double-check your SQL!

Read More: