bool releaseStatement ( mixed $stmt )
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.
- $stmt A statement resource, as returned by prepare()
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);