title: Fatal error: Call to a member function fetch_row() on boolean
body: <p>I am trying to SELECT COUNT Total records of a table, what am I doing wrong ? thanks in advance</p>
  
  <p>I am getting this error</p>
  
  <blockquote>
    <p>Fatal error: Call to a member function fetch_row() on boolean</p>
  </blockquote>
  
  <pre><code>&lt;?php
  
  $mysqli = new mysqli('localhost','root','','testing');
  
  //Output any connection error
  if ($mysqli-&gt;connect_error) {
      die('Error : ('. $mysqli-&gt;connect_errno .') '. $mysqli-&gt;connect_error);
  }
  
  //get total number of records
  $results = $mysqli-&gt;query("SELECT COUNT(*) FROM users");
  $get_total_rows = $results-&gt;fetch_row(); //hold total records in variable
  
  $mysqli-&gt;close();
  ?&gt;
  </code></pre>