diff options
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r-- | system/database/DB_utility.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 94e7a0bda..af62dcf3d 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -75,6 +75,20 @@ class CI_DB_utility extends CI_DB_forge { // -------------------------------------------------------------------- /** + * Determine if a particular database exists + * + * @access public + * @param string + * @return boolean + */ + function database_exists($database_name) + { + return ( ! in_array($database_name, $this->list_databases())) ? FALSE : TRUE; + } + + // -------------------------------------------------------------------- + + /** * Optimize Table * * @access public |