Search the MySQL manual:

9.1.3.25 mysql_get_server_version()

unsigned long mysql_get_server_version(MYSQL *mysql)

Description

Returns version number of server as an integer (new in 4.1).

Return Values

A number that represents the MySQL server version in format:

main_version*10000 + minor_version *100 + sub_version

For example, 4.1.0 is returned as 40100.

This is useful to quickly determine the version of the server in a client program to know if some capability exits.

Errors

None.

User Comments

Add your own comment.