title: Count total rows
body: <p>I do like to have the user be able to see how many pictures they have uploaded.</p>
  
  <p>This code is in place:</p>
  
  <pre><code>$result = mysql_query("select count(1) from userid = '$userid' where FROM picture");
  $row = mysql_fetch_array($result);
  
  $total = $row[0];
  echo "Total picture: " . $total;
  </code></pre>
  
  <p>But it shows nothing. When I remove 'userid', it counts all rows in the picture table.</p>
  
  <p>I tried and failed.</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Warning: mysql_fetch_array() expects parameter 1 to be resource,
    boolean given in on line 14</p>
  </blockquote>