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

@@ -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
*