title: sqlsrv_fetch_array returning 1 less than the number of rows
body: <p>I'm working on some PHP stuff, and I'm trying to use sqlsrv_fetch_array() to return a set of results. I've noticed however that if the query returns x results in the management studio, it returns (x-1) results in the actual PHP query. </p>
  
  <p>This becomes a real problem when I am searching for a single thing, and it returns nothing.</p>
  
  <p>The code is as follows:</p>
  
  <pre><code>function sqe($colname, $aq = NULL, $init = NULL)
  {
      global $connection;
      $q = "SELECT TOP 2 * FROM tblname WHERE colname='" . $colName . "' ORDER BY colname DESC";
  
      $statement = sqlsrv_query($connection, $q);
  
      if (sqlsrv_fetch_array($statement) === false) {
          echo "Error fetching...";
          die(print_r(sqlsrv_errors(), true));
      } else {
          $source = "";
          echo $q;
  
          while ($row = sqlsrv_fetch_array($statement, SQLSRV_FETCH_ASSOC)){
              $source .= "&lt;li&gt;&lt;img src='data:image/png;base64," . $row['rowname'] . "' /&gt;&lt;/li&gt;";
          }
          echo ($source);
          sqlsrv_free_stmt($statement);
          die();
      }
  }
  </code></pre>
  
  <p>I believe the trouble is with the while loop, but I'm not sure what's actually causing it to return 1 less than what it should.</p>
  
  <p>Any ideas?</p>