/** close connection to previously opened database */ function close() { if (!is_null($this->db)) { if ($this->last_qres) { sqlite3_query_close($this->last_qres); $this->last_qres = null; } sqlite3_close($this->db); } $this->db = null; }
function DBclose() { global $DB; $result = false; if (isset($DB['DB']) && !empty($DB['DB'])) { switch ($DB['TYPE']) { case 'MYSQL': $result = mysql_close($DB['DB']); break; case 'POSTGRESQL': $result = pg_close($DB['DB']); break; case 'ORACLE': $result = ocilogoff($DB['DB']); break; case 'SQLITE3': $result = true; sqlite3_close($DB['DB']); free_db_access(); break; default: break; } } unset($GLOBALS['DB'], $GLOBALS['DB_TYPE'], $GLOBALS['DB_SERVER'], $GLOBALS['DB_PORT'], $GLOBALS['DB_DATABASE'], $GLOBALS['DB_USER'], $GLOBALS['DB_PASSWORD'], $GLOBALS['SQLITE_TRANSACTION']); return $result; }
/** * release all resources for this connection, and close database * * @return bool TRUE on sucess, FALSE otherwise. */ function disconnect() { return sqlite3_close($this->connection); }
<?php include 'includes/functions.php.inc'; include 'includes/connect.php.inc'; $conference = $_GET['conference']; recordConference($db, $conference); if ($db_engine == "sqlite") { sqlite3_close($db); }
public function close() { return sqlite3_close($this->conn); }