title: MySQL COUNT query results in 1 always
body: <p>I'm wondering why my MySQL <code>COUNT(*)</code> query always results in <code>-&gt;num_rows</code> to be equal <code>1</code>.</p>
  
  <pre><code>$result = $db-&gt;query("SELECT COUNT( * ) FROM u11_users");
  print $result-&gt;num_rows; // prints 1
  </code></pre>
  
  <p>Whereas fetching "real data" from the database works fine.</p>
  
  <pre><code>$result = $db-&gt;query("SELECT * FROM u11_users");
  print $result-&gt;num_rows; // prints the correct number of elements in the table
  </code></pre>
  
  <p>What could be the reason for this?</p>