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().
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
*