summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-25 08:40:16 +0200
committeradmin <devnull@localhost>2006-09-25 08:40:16 +0200
commit4ceac2d4efa5a16486b6e97911bb32e261b9d648 (patch)
tree0861dd86129ec60d1214d2da8bbe37600bdb54ef
parent72496373008b263e098cf6082cdce1d47d01d3f1 (diff)
-rw-r--r--system/database/DB_utility.php1
-rw-r--r--system/database/drivers/mssql/mssql_utility.php17
-rw-r--r--system/database/drivers/mysql/mysql_utility.php17
-rw-r--r--system/database/drivers/mysqli/mysqli_utility.php17
-rw-r--r--system/database/drivers/oci8/oci8_utility.php12
-rw-r--r--system/database/drivers/odbc/odbc_utility.php18
-rw-r--r--system/database/drivers/postgre/postgre_utility.php17
-rw-r--r--system/database/drivers/sqlite/sqlite_utility.php17
8 files changed, 107 insertions, 9 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index b17b3d51c..8e1921dbc 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -210,7 +210,6 @@ class CI_DB_utility {
-
function create_table()
{
}
diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php
index bc398e7f7..61fe5fcbc 100644
--- a/system/database/drivers/mssql/mssql_utility.php
+++ b/system/database/drivers/mssql/mssql_utility.php
@@ -34,7 +34,7 @@ class CI_DB_mssql_utility extends CI_DB_utility {
*/
function create_database($name)
{
- return $this->db->query("CREATE DATABASE ".$this->db->_escape_table($name));
+ return $this->db->query("CREATE DATABASE ".$name);
}
// --------------------------------------------------------------------
@@ -48,7 +48,7 @@ class CI_DB_mssql_utility extends CI_DB_utility {
*/
function drop_database($name)
{
- return $this->db->query("DROP DATABASE ".$this->db->_escape_table($name));
+ return $this->db->query("DROP DATABASE ".$name);
}
// --------------------------------------------------------------------
@@ -75,6 +75,19 @@ class CI_DB_mssql_utility extends CI_DB_utility {
}
// --------------------------------------------------------------------
+
+ /**
+ * Drop Table
+ *
+ * @access public
+ * @return bool
+ */
+ function drop_table($table)
+ {
+ "DROP TABLE ".$this->db->_escape_table($name);
+ }
+
+ // --------------------------------------------------------------------
/**
* Version number query string
diff --git a/system/database/drivers/mysql/mysql_utility.php b/system/database/drivers/mysql/mysql_utility.php
index 5bbf46810..23c4e094d 100644
--- a/system/database/drivers/mysql/mysql_utility.php
+++ b/system/database/drivers/mysql/mysql_utility.php
@@ -33,7 +33,7 @@ class CI_DB_mysql_utility extends CI_DB_utility {
*/
function create_database($name)
{
- return $this->db->query("CREATE DATABASE ".$this->db->_escape_table($name));
+ return $this->db->query("CREATE DATABASE ".$name);
}
// --------------------------------------------------------------------
@@ -47,7 +47,7 @@ class CI_DB_mysql_utility extends CI_DB_utility {
*/
function drop_database($name)
{
- return $this->db->query("DROP DATABASE ".$this->db->_escape_table($name));
+ return $this->db->query("DROP DATABASE ".$name);
}
// --------------------------------------------------------------------
@@ -76,6 +76,19 @@ class CI_DB_mysql_utility extends CI_DB_utility {
// --------------------------------------------------------------------
/**
+ * Drop Table
+ *
+ * @access public
+ * @return bool
+ */
+ function drop_table($table)
+ {
+ "DROP TABLE IF EXISTS ".$this->db->_escape_table($name);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Version number query string
*
* @access public
diff --git a/system/database/drivers/mysqli/mysqli_utility.php b/system/database/drivers/mysqli/mysqli_utility.php
index 14a6ef8cf..ca8f3fe34 100644
--- a/system/database/drivers/mysqli/mysqli_utility.php
+++ b/system/database/drivers/mysqli/mysqli_utility.php
@@ -33,7 +33,7 @@ class CI_DB_mysqli_utility extends CI_DB_utility {
*/
function create_database($name)
{
- return $this->db->query("CREATE DATABASE ".$this->db->_escape_table($name));
+ return $this->db->query("CREATE DATABASE ".$name);
}
// --------------------------------------------------------------------
@@ -47,7 +47,7 @@ class CI_DB_mysqli_utility extends CI_DB_utility {
*/
function drop_database($name)
{
- return $this->db->query("DROP DATABASE ".$this->db->_escape_table($name));
+ return $this->db->query("DROP DATABASE ".$name);
}
// --------------------------------------------------------------------
@@ -72,6 +72,19 @@ class CI_DB_mysqli_utility extends CI_DB_utility {
return $dbs;
}
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Drop Table
+ *
+ * @access public
+ * @return bool
+ */
+ function drop_table($table)
+ {
+ "DROP TABLE IF EXISTS ".$this->db->_escape_table($name);
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/oci8/oci8_utility.php b/system/database/drivers/oci8/oci8_utility.php
index 03edcb2c8..7e3ee7285 100644
--- a/system/database/drivers/oci8/oci8_utility.php
+++ b/system/database/drivers/oci8/oci8_utility.php
@@ -63,6 +63,18 @@ class CI_DB_oci8_utility extends CI_DB_utility {
// --------------------------------------------------------------------
+ /**
+ * Drop Table
+ *
+ * @access public
+ * @return bool
+ */
+ function drop_table($table)
+ {
+ }
+
+ // --------------------------------------------------------------------
+
/**
* Version number query string
*
diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php
index 42537de70..cfd829cb6 100644
--- a/system/database/drivers/odbc/odbc_utility.php
+++ b/system/database/drivers/odbc/odbc_utility.php
@@ -84,6 +84,24 @@ class CI_DB_odbc_utility extends CI_DB_utility {
// --------------------------------------------------------------------
/**
+ * Drop Table
+ *
+ * @access public
+ * @return bool
+ */
+ function drop_table($table)
+ {
+ // Not a supported ODBC feature
+ if ($this->db_debug)
+ {
+ return $this->display_error('db_unsuported_feature');
+ }
+ return FALSE;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Version number query string
*
* @access public
diff --git a/system/database/drivers/postgre/postgre_utility.php b/system/database/drivers/postgre/postgre_utility.php
index 103f8d553..7bb210ab7 100644
--- a/system/database/drivers/postgre/postgre_utility.php
+++ b/system/database/drivers/postgre/postgre_utility.php
@@ -34,7 +34,7 @@ class CI_DB_postgre_utility extends CI_DB_utility {
*/
function create_database($name)
{
- return $this->db->query("CREATE DATABASE ".$this->db->_escape_table($name));
+ return $this->db->query("CREATE DATABASE ".$name);
}
// --------------------------------------------------------------------
@@ -48,7 +48,7 @@ class CI_DB_postgre_utility extends CI_DB_utility {
*/
function drop_database($name)
{
- return $this->db->query("DROP DATABASE ".$this->db->_escape_table($name));
+ return $this->db->query("DROP DATABASE ".$name);
}
// --------------------------------------------------------------------
@@ -73,6 +73,19 @@ class CI_DB_postgre_utility extends CI_DB_utility {
return $dbs;
}
+
+ // --------------------------------------------------------------------
+
+ /**
+ * Drop Table
+ *
+ * @access public
+ * @return bool
+ */
+ function drop_table($table)
+ {
+ "DROP TABLE ".$this->db->_escape_table($name)." CASCADE";
+ }
// --------------------------------------------------------------------
diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php
index 5f1f02eab..744ca3f37 100644
--- a/system/database/drivers/sqlite/sqlite_utility.php
+++ b/system/database/drivers/sqlite/sqlite_utility.php
@@ -80,6 +80,23 @@ class CI_DB_sqlite_utility extends CI_DB_utility {
// --------------------------------------------------------------------
/**
+ * Drop Table
+ *
+ * @access public
+ * @return bool
+ */
+ function drop_table($table)
+ {
+ if ($this->db_debug)
+ {
+ return $this->display_error('db_unsuported_feature');
+ }
+ return array();
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Version number query string
*
* @access public