title: Why is this MySQL Select query returning an error, but completing the Select perfectly fine?
body: <p>I have this PHP with a MySQL SELECT:</p>
  
  <pre><code>$q = "SELECT signup_id, email 
          FROM signups 
         LIMIT ". $inNum;
  $r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n&lt;br /&gt;MySQL Error: " . mysqli_error($dbc));
  
  if (mysqli_affected_rows($dbc) &gt;= 1) {
      while($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) {
  </code></pre>
  
  <p>This is the error I am receiving:</p>
  
  <pre><code>mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given
  </code></pre>
  
  <p>I am not sure why I am receiving this error because the code is running perfectly fine.</p>
  
  <p>Any ideas?</p>