title: MySQL - Show result of count
body: <p>I just trying to show a result of a consult in MySQL (PHP).
  The code is:</p>
  
  <pre><code>$example = mysql_query("SELECT count(*) as text FROM table WHERE name = '$name'");
  $qtd = mysql_num_rows($example);
  while($data = mysql_fetch_array($qtd)){
  $count = $data["text"];
  }
  
  echo "&lt;h3&gt;($count)&lt;/h3&gt;";
  </code></pre>
  
  <blockquote>
    <p>Error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\Site\index.php on line 9</p>
  </blockquote>