wpdb::close()
Closes the current database connection.
Description Description
Return Return
(bool) True if the connection was successfully closed, false if it wasn't, or the connection doesn't exist.
Source Source
File: wp-includes/wp-db.php
public function close() { if ( ! $this->dbh ) { return false; } if ( $this->use_mysqli ) { $closed = mysqli_close( $this->dbh ); } else { $closed = mysql_close( $this->dbh ); } if ( $closed ) { $this->dbh = null; $this->ready = false; $this->has_connected = false; } return $closed; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |