May 2005
Intermediate to advanced
352 pages
14h 39m
English
mysql_get_host_info( )
char *mysql_get_host_info(MYSQL *mysql)
This returns the hostname and the connection type for the current connection.
...
MYSQL *mysql;
mysql = mysql_init(NULL);
mysql_real_connect(mysql,"localhost","marie","password",
NULL,0,NULL,0);
printf("Host Info: %s \n", mysql_get_host_info(mysql));
mysql_close(mysql);
...The results of this program excerpt will look something like the following:
Host Info: Localhost via UNIX socket
Read now
Unlock full access