DB_common::freePrepared() – Releases resources associated with a prepared SQL statement


boolean freePrepared ( resource $stmt , boolean $free_resource = true )


Removes the memory occupied by the internal notations that keep track of prepared SQL statements. Does not delete the DB_result object itself.


resource $stmt

statement resource identifier returned from prepare()

boolean $free_resource

should the PHP resource be freed too? Use false if you need to get data from the result set later.

Parameter available since Release 1.7.0.

Return value

boolean - Returns TRUE on success, FALSE on failure.


This function can not be called statically.


Using freePrepared()

// Once you have a valid DB object named $db...
$sth $db->prepare('INSERT INTO numbers (number) VALUES (?)');
Runs a prepared SQL statement for each element of an array (Previous) Runs a query and returns all the data as an array (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.