FBIRD_CLOSE
Purpose
Use the fbird_close function to close a connection
handle to a Firebird server.
Syntax
<close> ::= fbird_close(
[ conn_hndl ] )
Element
|
Type
|
Description
|
conn_hndl
|
resource
|
A valid connection handle
|
<return>
|
bool
|
True on success, False on failure
|
Semantics
The fbird_close function closes the connection to
a Firebird database that is associated with a connection handle as
returned from fbird_connect(). This function returns True on success
or False on failure.
If a connection handle is not provided, then the
"default" connection will be used. The default connection
is assigned every time you call fbird_connect or fbird_pconnect, so
if you have multiple connections it will be whichever one was
connected last.
The default transaction of the connection is
committed, other transactions (if any) are rolled back.
Example
The below example shows a full open/close
sequence:
$conn = fbird_connect($host_db, $username,
$password); $sql = 'SELECT a FROM tblname'; $cur =
fbird_query($conn, $sql); while ($row = fbird_fetch_object($cur))
{ echo
$row->A; } fbird_free_result($row); fbird_free_query($cur); fbird_close($conn);
See also
fbird_connect,
fbird_pconnect,
fbird_trans
|