예제 #1
0
 /** 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;
 }
예제 #2
0
파일: db.inc.php 프로젝트: rennhak/zabbix
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;
}
예제 #3
0
 /**
  *  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);
}
예제 #5
0
 public function close()
 {
     return sqlite3_close($this->conn);
 }