function _close() { return @fbsql_close($this->_connectionID); }
/** * Disconnects from the database server * * @return bool TRUE on success, FALSE on failure */ function disconnect() { $ret = @fbsql_close($this->connection); $this->connection = null; return $ret; }
/** * all the RDBMS specific things needed close a DB connection * * @return boolean * @access private **/ function _close() { if ($this->connection != 0) { if (isset($this->supported['Transactions']) && !$this->auto_commit) { $result = $this->autoCommit(TRUE); } @fbsql_close($this->connection); $this->connection = 0; $this->affected_rows = -1; if (isset($result) && MDB::isError($result)) { return $result; } unset($GLOBALS['_MDB_databases'][$this->database]); return TRUE; } return FALSE; }
public function close() { if (!empty($this->connect)) { @fbsql_close($this->connect); } else { return false; } }
/** * execute a query as DBA * * @param string $query the SQL query * @param mixed $types array that contains the types of the columns in * the result set * @param boolean $is_manip if the query is a manipulation query * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function &standaloneQuery($query, $types = null, $is_manip = false) { $user = $this->options['DBA_username'] ? $this->options['DBA_username'] : $this->dsn['username']; $pass = $this->options['DBA_password'] ? $this->options['DBA_password'] : $this->dsn['password']; $connection = $this->_doConnect($user, $pass, $this->options['persistent']); if (MDB2::isError($connection)) { return $connection; } $offset = $this->offset; $limit = $this->limit; $this->offset = $this->limit = 0; $query = $this->_modifyQuery($query, $is_manip, $limit, $offset); $result =& $this->_doQuery($query, $is_manip, $connection, $this->database_name); if (!MDB2::isError($result)) { $result = $this->_affectedRows($connection, $result); } @fbsql_close($connection); return $result; }
/** * Log out and disconnect from the database. * * @param boolean $force if the disconnect should be forced even if the * connection is opened persistently * @return mixed true on success, false if not connected and error * object on error * @access public */ function disconnect($force = true) { if (is_resource($this->connection)) { if ($this->in_transaction) { $this->rollback(); } if (!$this->opened_persistent || $force) { @fbsql_close($this->connection); } } return parent::disconnect($force); return MDB2_OK; }