X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdba.php;h=86a3762b44f041945891eca407e5e31269fd7b77;hb=5efab810f5ac961995940e8ca4051123334111c2;hp=97f6c8795645492aeda5f47cd5707dc0b325545a;hpb=c0aac548274d463c611a9c0317fa6ec7d205a30e;p=friendica.git diff --git a/include/dba.php b/include/dba.php index 97f6c87956..86a3762b44 100644 --- a/include/dba.php +++ b/include/dba.php @@ -91,6 +91,23 @@ class dba { return $this->db; } + /** + * @brief Returns the MySQL server version string + * + * This function discriminate between the deprecated mysql API and the current + * object-oriented mysqli API. Example of returned string: 5.5.46-0+deb8u1 + * + * @return string + */ + public function server_info() { + if ($this->mysqli) { + $return = $this->db->server_info; + } else { + $return = mysql_get_server_info($this->db); + } + return $return; + } + public function q($sql, $onlyquery = false) { global $a;