The PHP Function SQLSRV_Numb_Rows()
The php function sqlsrv_num_rows() returns the number of rows in a recordset. It is an alternative to mysql_num_rows(). This function is used to prepare a query for execution. It is useful for preparing queries that will be executed multiple times with different parameter values. It is also a useful function for debugging.
Returns a statement resource created by sqlsrv_query() or sqlsrv_prepare(). The statement resource can be a static or keyset cursor. Returns an array on success and FALSE if there are no more rows to return or an error occurred.
Sets the query timeout in seconds. The value must be a positive integer or 0 and must be less than or equal to SQLSRV_PARAM_MAX. This option is only used when a statement resource has been created with sqlsrv_query().
Configures whether or not to send stream data at query execution. If not configured, the driver will wait indefinitely for results.
Gets field data from the current row. The index of the field to be retrieved must start at 0. Field indices must be accessed in order. The returned data must be a valid PHP data type.
Returns an array on success and FALSE when there are no more rows to return or an SQLSRV error occurs. This function requires that the statement resource be created with either a static or keyset cursor. It can be used to retrieve rows from both INSERT and SELECT statements. However, you must call sqlsrv_next_result() to move past the first result of an INSERT and to the rows returned by a SELECT.