]> git.mxchange.org Git - friendica.git/blobdiff - include/dba.php
[frio] Fix code block display
[friendica.git] / include / dba.php
index 97f6c8795645492aeda5f47cd5707dc0b325545a..86a3762b44f041945891eca407e5e31269fd7b77 100644 (file)
@@ -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;