/**
* 判断数据库是否存在
* @param $db_name 数据库名称
* @return boolean true 成功, false 失败
*/
static public function isDBExist($db_name)
{
$rs = Db::execute('SELECT * FROM information_schema.schemata WHERE schema_name="'.$db_name.'"');
if ($rs) {
//存在
return true;
}
//不存在
return false;
}
智享笔记