added PMA_DBI_get_client_info(), PMA_DBI_get_proto_info() PMA_DBI_get_host_info()

This commit is contained in:
Sebastian Mendel
2005-11-24 12:31:34 +00:00
parent dd8708f8fa
commit 0419817bb5
3 changed files with 92 additions and 0 deletions

View File

@@ -23,6 +23,8 @@ $Source$
* themes/original/*, css/phpmyadmin.css.php:
- updated theme
- added version, to include only needed styles
* libraries/dbi/*: added PMA_DBI_get_client_info(), PMA_DBI_get_proto_info()
PMA_DBI_get_host_info()
2005-11-23 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* *REVERTED* libraries/display_select_lang.lib.php: correct lang definition

View File

@@ -152,6 +152,51 @@ function PMA_DBI_free_result($result) {
}
}
/**
* Returns a string representing the type of connection used
* @uses mysql_get_host_info()
* @uses $GLOBALS['userlink'] as default for $link
* @param resource $link mysql link
* @return string type of connection used
*/
function PMA_DBI_get_host_info( $link = NULL ) {
if ( NULL === $link ) {
if ( isset( $GLOBALS['userlink'] ) ) {
$link = $GLOBALS['userlink'];
} else {
return false;
}
}
return mysql_get_host_info( $link );
}
/**
* Returns the version of the MySQL protocol used
* @uses mysql_get_proto_info()
* @uses $GLOBALS['userlink'] as default for $link
* @param resource $link mysql link
* @return integer version of the MySQL protocol used
*/
function PMA_DBI_get_proto_info( $link = NULL ) {
if ( NULL === $link ) {
if ( isset( $GLOBALS['userlink'] ) ) {
$link = $GLOBALS['userlink'];
} else {
return false;
}
}
return mysql_get_proto_info( $link );
}
/**
* returns a string that represents the client library version
* @uses mysql_get_client_info()
* @return string MySQL client library version
*/
function PMA_DBI_get_client_info() {
return mysql_get_client_info();
}
/**
* returns last error message or false if no errors occured
*

View File

@@ -187,6 +187,51 @@ function PMA_DBI_free_result($result) {
}
}
/**
* Returns a string representing the type of connection used
* @uses mysqli_get_host_info()
* @uses $GLOBALS['userlink'] as default for $link
* @param resource $link mysql link
* @return string type of connection used
*/
function PMA_DBI_get_host_info( $link = NULL ) {
if ( NULL === $link ) {
if ( isset( $GLOBALS['userlink'] ) ) {
$link = $GLOBALS['userlink'];
} else {
return false;
}
}
return mysqli_get_host_info( $link );
}
/**
* Returns the version of the MySQL protocol used
* @uses mysqli_get_proto_info()
* @uses $GLOBALS['userlink'] as default for $link
* @param resource $link mysql link
* @return integer version of the MySQL protocol used
*/
function PMA_DBI_get_proto_info( $link = NULL ) {
if ( NULL === $link ) {
if ( isset( $GLOBALS['userlink'] ) ) {
$link = $GLOBALS['userlink'];
} else {
return false;
}
}
return mysqli_get_proto_info( $link );
}
/**
* returns a string that represents the client library version
* @uses mysqli_get_client_info()
* @return string MySQL client library version
*/
function PMA_DBI_get_client_info() {
return mysqli_get_client_info();
}
/**
* returns last error message or false if no errors occured
*