Query: sqlsrv_free_stmt
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
SQLSRV_FREE_STMT(3) SQLSRV_FREE_STMT(3) sqlsrv_free_stmt - Frees all resources for the specified statementSYNOPSISbool sqlsrv_free_stmt (resource $stmt)DESCRIPTIONFrees all resources for the specified statement. The statement cannot be used after sqlsrv_free_stmt(3) has been called on it. If sql- srv_free_stmt(3) is called on an in-progress statement that alters server state, statement execution is terminated and the statement is rolled back.PARAMETERSo $stmt - The statment for which resources are freed. Note that NULL is a valid parameter value. This allows the function to be called multiple times in a script.RETURN VALUESReturns TRUE on success or FALSE on failure.EXAMPLESExample #1 sqlsrv_free_stmt(3) example <?php $serverName = "serverNamesqlexpress"; $connectionInfo = array( "Database"=>"dbName", "UID"=>"username", "PWD"=>"password"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn === false ) { die( print_r( sqlsrv_errors(), true)); } $stmt = sqlsrv_query( $conn, "SELECT * FROM Table_1"); if( $stmt === false ) { die( print_r( sqlsrv_errors(), true)); } /*------------------------------- Process query results here. -------------------------------*/ /* Free the statement resources. */ sqlsrv_free_stmt( $stmt); ?>NOTESThe main difference between sqlsrv_free_stmt(3) and sqlsrv_cancel(3) is that a statement resource cancelled with sqlsrv_cancel(3) can be re-executed if it was created with sqlsrv_prepare(3). A statement resource cancelled with sqlsrv_free_statement(3) cannot be re-executed.SEE ALSOsqlsrv_cancel(3). PHP Documentation Group SQLSRV_FREE_STMT(3)
Related Man Pages |
---|
sqlsrv_prepare(3) - php |
sqlsrv_execute(3) - php |
sqlsrv_next_result(3) - php |
sqlsrv_rollback(3) - php |
sqlsrv_rows_affected(3) - php |
Similar Topics in the Unix Linux Community |
---|
my case statement doesn't work.. |
sql in shell script |
Use of GOTO statement in scripts |
IF statement failure |
Multiple conditions in a CASE statement |