From 6cec6a58d993fb0b1beb5fac7ea0d1cb9769c0a4 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 25 Sep 2006 06:56:49 +0000 Subject: --- system/database/DB_utility.php | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'system/database/DB_utility.php') diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 8e1921dbc..128984d4f 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -181,7 +181,8 @@ class CI_DB_utility { return FALSE; } - return $this->_field_data($this->db->dbprefix.$table); + $query = $this->db->query($this->_field_data($this->db->dbprefix.$table)); + return $query->field_data(); } // -------------------------------------------------------------------- @@ -208,6 +209,32 @@ class CI_DB_utility { return current($fields); } + // -------------------------------------------------------------------- + + /** + * Create database + * + * @access public + * @param string the database name + * @return bool + */ + function create_database($name) + { + $sql = $this->_create_database($name); + + if (is_bool($sql)) + { + return $sql; + } + + return $this->db->query($sql); + } + + // -------------------------------------------------------------------- + + + + function create_table() -- cgit v1.2.3-24-g4f1b