Rearranged lines

This commit is contained in:
Michael 2017-04-24 06:26:49 +00:00
parent 34bb34b9a4
commit 311c029bcf

View file

@ -467,6 +467,22 @@ class dba {
return $id; 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, * @brief Replaces ANY_VALUE() function by MIN() function,
* if the database server does not support ANY_VALUE(). * if the database server does not support ANY_VALUE().
@ -487,22 +503,6 @@ class dba {
return $sql; 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 * @brief Executes a prepared statement
* *