May 2005
Intermediate to advanced
352 pages
14h 39m
English
mysql_get_server_version( )
unsigned long mysql_get_server_version(MYSQL *mysql)
This returns the version of the server for the current connection in a numeric format. For example, for Version 4.1.7, the function will return 40107.
...
MYSQL *mysql;
mysql = mysql_init(NULL);
mysql_real_connect(mysql,"localhost","root","password",
NULL,0,NULL,0);
printf("Server Version: %ul \n",
mysql_get_server_version(mysql));
mysql_close(mysql);
...Read now
Unlock full access