mysql_get_server_version — Get numeric server version

unsigned long mysql_get_server_version(MYSQL * mysql);

Returns an integer representing the version of connected server

Parameters

mysql

A mysql handle, which was previously allocated by mysql_init() or mysql_real_connect().

Return value

A long integer containting the version of the connected server.

[Note]

The form of the version number is VERSION_MAJOR * 10000 + VERSION_MINOR * 100 + VERSION_PATCH

See also

mysql_get_server_info()