Home  >  Article  >  php教程  >  php获取mysql数据库版本号 mysql_get_server_info

php获取mysql数据库版本号 mysql_get_server_info

PHP中文网
PHP中文网Original
2017-03-23 10:22:372406browse

php获取mysql数据库版本号 mysql_get_server_info

$getmysqlver=@mysql_get_server_info();
if(empty($getmysqlver))
{
$getmysqlver='5.0';
}
if($getmysqlver>='5.0')
{
$phome_db_ver='5.0';
}
elseif($getmysqlver>='4.1')
{
$phome_db_ver='4.1';
}
else
{
$phome_db_ver='4.0';
}

相关文章:

php获取mysql数据库中的所有表名的代码

PHP获取mysql数据库表字段的方法

PHP获取MySQL数据库里所有表的实现代码

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn