sqlsrv_num_rows

sqlsrv_num_rows - Retrieves the number of rows in a result set
Manual
Code Examples

sqlsrv_num_rows( resource$stmt ): mixed

Retrieves the number of rows in a result set. This function requires that the statement resource be created with a static or keyset cursor. For more information, see sqlsrv_query, sqlsrv_prepare, or Specifying a Cursor Type and Selecting Rows in the Microsoft SQLSRV documentation.

Parameters

stmt

The statement for which the row count is returned. The statement resource must be created with a static or keyset cursor. For more information, see sqlsrv_query, sqlsrv_prepare, or Specifying a Cursor Type and Selecting Rows in the Microsoft SQLSRV documentation.

Return Values

Returns the number of rows retrieved on success and false if an error occurred. If a forward cursor (the default) or dynamic cursor is used, false is returned.

Related Functions

Example of sqlsrv_num_rows

Show all examples for sqlsrv_num_rows

PHP Version: