title: Call to a member function fetch_object() on boolean in mysqli code
body: <p>My sql code is right but I receive this error:</p>
  
  <blockquote>
    <p>Call to a member function fetch_object() on boolean</p>
  </blockquote>
  
  <p>My code:</p>
  
  <pre><code>$sql = "SELECT * FROM `".$chat_id."` WHERE `tg_id`='".$user_id."'";
  $ress = $conn-&gt;query($sql)-&gt;fetch_object()-&gt;position;
  </code></pre>
  
  <p>My variables are ok and I have <code>$chat_id</code> table and a row with condition!</p>