title: sqlsrv_num_rows Not Returning Any Value
body: <p>I am trying to get the number of rows returned in a query. The while loop looping through the results works, but for some reason the sqlsrv_num_rows does not return any value:</p>
  
  <pre><code>$result = "SELECT * from dtable WHERE id2 = 'apple'";
  $query = sqlsrv_query($conn, $result);
  
  $row_count = sqlsrv_num_rows($query);
  echo $row_count;
  
  while($row = sqlsrv_fetch_array($query))
  {
        echo 'yes';
  }
  </code></pre>
  
  <p>Thanks.</p>