diff options
author | admin <devnull@localhost> | 2006-09-25 08:56:49 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-25 08:56:49 +0200 |
commit | 6cec6a58d993fb0b1beb5fac7ea0d1cb9769c0a4 (patch) | |
tree | 7822c065d054814fd1c44d1d2ef0159d535b446a /system/database/DB_utility.php | |
parent | 4ceac2d4efa5a16486b6e97911bb32e261b9d648 (diff) |
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r-- | system/database/DB_utility.php | 29 |
1 files changed, 28 insertions, 1 deletions
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() |