title: how to prevent this error : Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in ... on line 11
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2973202/php-error-mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given">PHP Error: mysql_fetch_array() expects parameter 1 to be resource, boolean given</a>  </p>
  </blockquote>
  
  
  
  <p>I'm very confused with this error, it shows when I try to return a result from the DB that doesn't exist ... I tried <code>mysql_num_rows()</code> but it returns the same error but instead of <code>mysql_fetch_assoc</code> expects ...  it says <code>mysql_num_rows()</code> expects ...</p>
  
  <p>I set <code>error_reporting(0)</code> to avoid showing this error, but I'm not satisfied with this solution ...</p>