Support for this function is limited; it is currently only implemented in the oci8 driver. See the Feature Comparison Matrix.
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.
True if the statement was successfully released, false otherwise.
/* * 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);