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 rowsSYNOPSISbool sqlsrv_has_rows (resource $stmt)DESCRIPTIONIndicates whether the specified statement has rows.PARAMETERSo $stmt - A statement resource returned by sqlsrv_query(3) or sqlsrv_execute(3).RETURN VALUESReturns TRUE if the specified statement has rows and FALSE if the statement does not have rows or if an error occurred.EXAMPLESExample #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 ALSOsqlsrv_num_rows(3), sqlsrv_query(3). PHP Documentation Group SQLSRV_HAS_ROWS(3)
Related Man Pages |
---|
sqlsrv_cancel(3) - php |
sqlsrv_free_stmt(3) - php |
sqlsrv_has_rows(3) - php |
sqlsrv_num_fields(3) - php |
sqlsrv_rows_affected(3) - php |
Similar Topics in the Unix Linux Community |
---|
Difference between two rows |
Delete repeated rows from a file |
If statement is not working in KSH |
Combine 2 files by rows |
Columns to rows |