title: Call to a member function bind_param() on boolean
body: <p>I try to bind parameters to sql (mysqli) in php, but there is an error code as written above. 
  This is the code I wrote:</p>
  
  <pre><code>$stmt = $conn-&gt;prepare("INSERT INTO assignments (Classes_has_Subjects_classesHasSubjectsId, assignmentName, gradeForAssignment,protectiveGrade) 
                                    VALUES (?, ?, ?, ?)");
  if ($stmt = false)
  {
      echo "false";
  }
  else{
      $stmt-&gt;bind_param("sss", $classesHasSubjectsId, $assignmentName, $gradeForAssignment,  $protectiveGrade);
      $stmt-&gt;execute();
  }
  </code></pre>
  
  <p>and here is the error message: 
  11</p>
  
  <blockquote>
    <p>Fatal error: Call to a member function bind_param() on boolean in</p>
  </blockquote>
  
  <p>What's wrong?</p>