v5:reference:connection:releasestatement
releaseStatement
Support for this function is limited; it is currently only implemented in the oci8 driver. See the Feature Comparison Matrix.
Description
The releaseStatement()
method releases a previously prepared statement, freeing all associated database server resources.
With the oci8 driver, this helps avoiding ORA-01000: maximum open cursors exceeded errors when the prepare() statement is used in a loop (see issue #770).
Available since ADOdb 5.22.0.
Parameters
- $stmt A statement resource, as returned by prepare()
Returns
True if the statement was successfully released, false otherwise.
Usage
/* * Connection to Oracle database */ $stmt = $db->prepare('INSERT INTO table (field1, field2) VALUES (:p1, :p2)'); $rs = $db->execute($stmt, ['pf1' => 'Value1', 'pf2' => 'Value2']); $db->releaseStatement($stmt);
v5/reference/connection/releasestatement.txt · Last modified: 2022/01/16 18:10 by dregad