title: Fatal Error: Call To A Member Function Fetch_assoc() On Boolean
body: <p>I want to select only posts where authorId is only 1 and 2. And i do that like this:</p>
  
  <pre><code>$array = [1,2];
  $array = implode(", ",$array);
  $sql = "SELECT * FROM post WHERE authorId = ({$array})";
  $res = $con-&gt;query($sql);
  
  while($row = $res-&gt;fetch_assoc()){
      echo $row['firstname'] . ' ' . $row['lastname'];
  }
  </code></pre>
  
  <p>I got error message: </p>
  
  <pre><code>Fatal error: Call to a member function fetch_assoc() on boolean in C:\xampp\blablaba.php on line blablaba
  </code></pre>
  
  <p>But when i try to get posts just from one author i dont get any error message. Actually it works, here is my code for one authorId: </p>
  
  <pre><code>$sql = "SELECT * FROM post WHERE authorId = 1)";
  $res = $con-&gt;query($sql);
  
  while($row = $res-&gt;fetch_assoc()){
      echo $row['firstname'] . ' ' . $row['lastname'];
  }
  </code></pre>