|
|
|
@ -611,9 +611,13 @@ function database_server_connect() { |
|
|
|
|
* @return boolean |
|
|
|
|
*/ |
|
|
|
|
function database_exists($database_name) { |
|
|
|
|
if (empty($database_name)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
$select_database = @Database::select_db($database_name); |
|
|
|
|
$show_database = false; |
|
|
|
|
$result = @Database::query("SHOW DATABASES LIKE '".Database::escape_string($database_name)."' "); |
|
|
|
|
$sql = "SHOW DATABASES LIKE '".addslashes($database_name)."'"; |
|
|
|
|
$result = @Database::query($sql); |
|
|
|
|
if (Database::num_rows($result)) { |
|
|
|
|
$show_database = true; |
|
|
|
|
} |
|
|
|
|