Obtain MySQL version info

Started by Spaceman-Spiff, August 16, 2003, 01:51:53 PM

Previous topic - Next topic

Spaceman-Spiff

I'm just wondering if its possible to get mysql version using php, like the one shown in phpinfo
i think this could be useful when i need to use specific queries that are only available in certain versions of mysql

Michele

Take a look in install.php for function mysql_version_check($reqver) . 8)
Dubito ergo cogito ergo sum

Spaceman-Spiff

thanks

the function i'm looking for is mysql_get_client_info and mysql_get_server_info()
cant tell the difference between them though
i guess i'll just have to use both

[Unknown]

*holds up hand*

Wait, wait... important difference here!!!

The *client* is PHP.  This information usually is... useless.  The server is the one you want.

-[Unknown]

Spaceman-Spiff

errr install.php uses mysql_get_client_info and php manual says: mysql_get_client_info() returns a string that represents the client library version.

[Unknown]

$curver = mysql_get_server_info() < mysql_get_client_info() ? mysql_get_server_info() : mysql_get_client_info();

Uses both.

-[Unknown]

Shoeb Omar

lmao the fix all solution.  I'm assuming it returns in tthen.

Advertisement: