Jump to content

[SOLVED] Getting mysql version via php


webent

Recommended Posts

Hi, I was wanting to keep the mysql version dynamically updated on one of my pages... I use...

echo (phpversion());

...to get the phpversion...

 

I was thinking that this would work...

echo phpinfo(Client API version);

...but it doesn't...

 

Any ideas anyone?

Link to comment
https://forums.phpfreaks.com/topic/110433-solved-getting-mysql-version-via-php/
Share on other sites

Thanks, worked great... Here's the final code...

 

include_once "connection.php";
$mysql_version = mysql_get_server_info();
$search = array("-", "standard", "log");
$mysql_version = str_replace($search,"",$mysql_version);  
echo $mysql_version;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.