php man page for sqlsrv_has_rows

Query: sqlsrv_has_rows

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

SQLSRV_HAS_ROWS(3)														SQLSRV_HAS_ROWS(3)

sqlsrv_has_rows - Indicates whether the specified statement has rows

SYNOPSIS
bool sqlsrv_has_rows (resource $stmt)
DESCRIPTION
Indicates whether the specified statement has rows.
PARAMETERS
o $stmt - A statement resource returned by sqlsrv_query(3) or sqlsrv_execute(3).
RETURN VALUES
Returns TRUE if the specified statement has rows and FALSE if the statement does not have rows or if an error occurred.
EXAMPLES
Example #1 sqlsrv_has_rows(3) example <?php $server = "serverNamesqlexpress"; $connectionInfo = array( "Database"=>"dbName", "UID"=>"username", "PWD"=>"password" ) $conn = sqlsrv_connect( $server, $connectionInfo ); $stmt = sqlsrv_query( $conn, "SELECT * FROM Table_1"); if ($stmt) { $rows = sqlsrv_has_rows( $stmt ); if ($rows === true) echo "There are rows. <br />"; else echo "There are no rows. <br />"; } ?>
SEE ALSO
sqlsrv_num_rows(3), sqlsrv_query(3). PHP Documentation Group SQLSRV_HAS_ROWS(3)
Related Man Pages
sqlsrv_query(3) - php
sqlsrv_get_field(3) - php
sqlsrv_fetch_array(3) - php
sqlsrv_free_stmt(3) - php
sqlsrv_next_result(3) - php
Similar Topics in the Unix Linux Community
Difference between two rows
sum of all matching rows using awk
delete rows with a criteria
Help with a simple function
How do i add horizontally??