summaryrefslogtreecommitdiffstats
path: root/system/database/DB_utility.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-25 23:06:46 +0200
committeradmin <devnull@localhost>2006-09-25 23:06:46 +0200
commit83b05a860a5f208d15942b517385848cfe4887bb (patch)
treeda87851bb10fd9bdf913fb8bca9d726fb0083423 /system/database/DB_utility.php
parent6cec6a58d993fb0b1beb5fac7ea0d1cb9769c0a4 (diff)
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r--system/database/DB_utility.php60
1 files changed, 58 insertions, 2 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 128984d4f..36d74c5b3 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -232,14 +232,70 @@ class CI_DB_utility {
// --------------------------------------------------------------------
+ /**
+ * Drop database
+ *
+ * @access public
+ * @param string the database name
+ * @return bool
+ */
+ function drop_database($name)
+ {
+ $sql = $this->_drop_database($name);
+
+ if (is_bool($sql))
+ {
+ return $sql;
+ }
+
+ return $this->db->query($sql);
+ }
+ // --------------------------------------------------------------------
+ /**
+ * List databases
+ *
+ * @access public
+ * @return bool
+ */
+ function list_databases()
+ {
+ $query = $this->db->query($this->_list_database());
+ $dbs = array();
+ if ($query->num_rows() > 0)
+ {
+ foreach ($query->result_array() as $row)
+ {
+ $dbs[] = current($row);
+ }
+ }
+
+ return $dbs;
+ }
+ // --------------------------------------------------------------------
-
- function create_table()
+ /**
+ * Drop Table
+ *
+ * @access public
+ * @param string the table name
+ * @return bool
+ */
+ function drop_table($name)
{
+ $sql = $this->_drop_table($name);
+
+ if (is_bool($sql))
+ {
+ return $sql;
+ }
+
+ return $this->db->query($sql);
}
+
+
function alter_table()
{