function sql_close() { if (!$this->db_connect_id) { return false; } if ($this->transaction) { @ibase_commit($this->db_connect_id); } if (sizeof($this->open_queries)) { foreach ($this->open_queries as $i_query_id => $query_id) { @ibase_free_query($query_id); } } return @ibase_close($this->db_connect_id); }
/** * Frees the internal resources associated with a prepared query * * @param resource $stmt the prepared statement's PHP resource * @param bool $free_resource should the PHP resource be freed too? * Use false if you need to get data * from the result set later. * * @return bool TRUE on success, FALSE if $result is invalid * * @see DB_ibase::prepare() */ function freePrepared($stmt, $free_resource = true) { if (!is_resource($stmt)) { return false; } if ($free_resource) { @ibase_free_query($stmt); } unset($this->prepare_tokens[(int) $stmt]); unset($this->prepare_types[(int) $stmt]); unset($this->manip_query[(int) $stmt]); return true; }
/** * Closes the cursor and the statement. * * @return bool */ public function close() { if ($stmt = $this->_stmtResult) { @ibase_free_result($this->_stmtResult); $this->_stmtResult = null; } if ($this->_stmtPrepared) { $r = @ibase_free_query($this->_stmtPrepared); $this->_stmtPrepared = null; return $r; } return false; }
function freeQuery($query) { ibase_free_query($query); return true; }
/** * Release resources allocated for the specified prepared query. * * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function free() { if (null === $this->positions) { return $this->db->raiseError(MDB2_ERROR, null, null, 'Prepared statement has already been freed', __FUNCTION__); } $result = MDB2_OK; if (null !== $this->statement && !@ibase_free_query($this->statement)) { $result = $this->db->raiseError(null, null, null, 'Could not free statement', __FUNCTION__); } parent::free(); return $result; }
function FreePreQuery($intPreQuery) { $this->intQuery = ibase_free_query($intPreQuery); if ($this->intDebug) { echo "Query prepared free...\t\t<br>"; } }