Rearranged lines

2022.09-rc
Michael 2017-04-24 06:26:49 +00:00
rodzic 34bb34b9a4
commit 311c029bcf
1 zmienionych plików z 16 dodań i 16 usunięć

Wyświetl plik

@ -467,6 +467,22 @@ class dba {
return $id;
}
function __destruct() {
if ($this->db) {
switch ($this->driver) {
case 'pdo':
$this->db = null;
break;
case 'mysqli':
$this->db->close();
break;
case 'mysql':
mysql_close($this->db);
break;
}
}
}
/**
* @brief Replaces ANY_VALUE() function by MIN() function,
* if the database server does not support ANY_VALUE().
@ -487,22 +503,6 @@ class dba {
return $sql;
}
function __destruct() {
if ($this->db) {
switch ($this->driver) {
case 'pdo':
$this->db = null;
break;
case 'mysqli':
$this->db->close();
break;
case 'mysql':
mysql_close($this->db);
break;
}
}
}
/**
* @brief Executes a prepared statement
*