title: mysql_num_rows not working sort of
body: <p>I got this </p>
  
  <pre><code>for($i = 1; $i &lt; 301; $i++)
  {
      $r8 = mysql_query("SELECT * FROM full_dump WHERE id_fd='".$last_id."' AND field_".$i." LIKE '%JAL?%' order by field_".$i." desc limit 0,1")or die(mysql_error());
      if ( mysql_num_rows($r8) == 1){
          while($row = mysql_fetch_array($r8))
          {
              $i4 = $i+1;
              $jalfd = trim($row['field_'.$i4.'']);
          }
      }
      else {
          $jalfd = "N/A";
      }
  }
  </code></pre>
  
  <p>It is part of a pile_upload script. All works but  not this.
  When I upload a file it may or may not contain the word JAL? and the next line has its value. No matter what, the end value of jalfd is N/A.  When I do </p>
  
  <pre><code>echo mysql_num_rows($r8);
  </code></pre>
  
  <p>I get the following when I have JAL? in the text file (you'll see a 1 in there)</p>
  
  <pre><code>000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  </code></pre>
  
  <p>an when I don't have JAL? (there is no 1)</p>
  
  <pre><code>000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  </code></pre>
  
  <p>I even tried </p>
  
  <pre><code>if ( intval(mysql_num_rows($r8)) == 1){
  </code></pre>
  
  <p>with no luck.</p>