title: Error message when using COUNT(*)
body: <p>I'm currently receiving this error message:</p>
  
  <blockquote>
    <p>"Catchable fatal error: Object of class mysqli_result could not be
    converted to string in ".</p>
  </blockquote>
  
  <p>I'm trying to count the number of rows in a table. I know you can also use <code>mysqli_num_rows</code> but I thought I could just use <code>SELECT COUNT ( * ) FROM table</code> but it doesn't seem to be working. How can I get the <code>Count(*)</code> to work?</p>
  
  <p>My code:</p>
  
  <pre><code>$query = "SELECT COUNT(*) FROM category";
  
  $select_all_categories = mysqli_query($connection, $query);
  
  echo "&lt;div class='huge'&gt; $select_all_categories &lt;/div&gt;"
  </code></pre>