diff options
Diffstat (limited to 'system/database/drivers/mysql')
-rw-r--r-- | system/database/drivers/mysql/mysql_utility.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php index 9bf2f5aa9..d4e97867a 100644 --- a/system/database/drivers/mysql/mysql_utility.php +++ b/system/database/drivers/mysql/mysql_utility.php @@ -24,6 +24,33 @@ */ class CI_DB_mysql_utility extends CI_DB_utility { + /** + * Create database + * + * @access public + * @param string the database name + * @return bool + */ + function create_database($name) + { + return $this->db->query("CREATE DATABASE ".$this->db->_escape_table($name)); + } + + // -------------------------------------------------------------------- + + /** + * Drop database + * + * @access public + * @param string the database name + * @return bool + */ + function drop_database($name) + { + return $this->db->query("DROP DATABASE ".$this->db->_escape_table($name)); + } + + // -------------------------------------------------------------------- /** * Version number query string @@ -86,6 +113,7 @@ class CI_DB_mysql_utility extends CI_DB_utility { } + } ?>
\ No newline at end of file |