wpdb::db_server_info() WordPress Method

The wpdb::db_server_info() method is used to get the version of the MySQL server being used by WordPress. This is useful for debugging purposes or for displaying the version number on a WordPress site.

wpdb::db_server_info() #

Retrieves full database server information.


Return

(string|false) Server info on success, false on failure.


Top ↑

Source

File: wp-includes/wp-db.php

	public function db_server_info() {
		if ( $this->use_mysqli ) {
			$server_info = mysqli_get_server_info( $this->dbh );
		} else {
			$server_info = mysql_get_server_info( $this->dbh );
		}

		return $server_info;
	}


Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.