select VERSION()
Current $res=mysql_query("select VERSION()");$row=mysql_fetch_row($res); This form calls SQL query to obtain.
If you want to query the version of the MYSQL support library (CLIENT) installed by PHP itself, you can use
A simpler way to use PHP's own functions mysql_get_server_info();