You are here

function DB_common::freePrepared in Flickr API 5

Frees the internal resources associated with a prepared query

Parameters

resource $stmt the prepared statement's PHP resource:

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

Return value

bool TRUE on success, FALSE if $result is invalid

See also

DB_common::prepare()

7 calls to DB_common::freePrepared()
DB_common::autoExecute in phpFlickr/PEAR/DB/common.php
Automaticaly generates an insert or update query and call prepare() and execute() with it
DB_common::getAll in phpFlickr/PEAR/DB/common.php
Fetches all of the rows from a query result
DB_common::getAssoc in phpFlickr/PEAR/DB/common.php
Fetches an entire query result and returns it as an associative array using the first column as the key
DB_common::getCol in phpFlickr/PEAR/DB/common.php
Fetches a single column from a query result and returns it as an indexed array
DB_common::getOne in phpFlickr/PEAR/DB/common.php
Fetches the first column of the first row from a query result

... See full list

File

phpFlickr/PEAR/DB/common.php, line 1066

Class

DB_common
DB_common is the base class from which each database driver class extends

Code

function freePrepared($stmt, $free_resource = true) {
  $stmt = (int) $stmt;
  if (isset($this->prepare_tokens[$stmt])) {
    unset($this->prepare_tokens[$stmt]);
    unset($this->prepare_types[$stmt]);
    unset($this->prepared_queries[$stmt]);
    return true;
  }
  return false;
}