diff options
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r-- | system/database/DB_utility.php | 79 |
1 files changed, 5 insertions, 74 deletions
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index e9caf9f3e..372c88f1f 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -6,7 +6,7 @@ *
* @package CodeIgniter
* @author Rick Ellis
- * @copyright Copyright (c) 2006, pMachine, Inc.
+ * @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://www.codeigniter.com/user_guide/license.html
* @link http://www.codeigniter.com
* @since Version 1.0
@@ -22,10 +22,10 @@ * @author Rick Ellis
* @link http://www.codeigniter.com/user_guide/database/
*/
-class CI_DB_utility {
+class CI_DB_utility extends CI_DB_forge {
var $db;
- var $data_cache = array();
+ var $data_cache = array();
/**
* Constructor
@@ -45,48 +45,6 @@ class CI_DB_utility { // --------------------------------------------------------------------
/**
- * Create database
- *
- * @access public
- * @param string the database name
- * @return bool
- */
- function create_database($db_name)
- {
- $sql = $this->_create_database($db_name);
-
- if (is_bool($sql))
- {
- return $sql;
- }
-
- return $this->db->query($sql);
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Drop database
- *
- * @access public
- * @param string the database name
- * @return bool
- */
- function drop_database($db_name)
- {
- $sql = $this->_drop_database($db_name);
-
- if (is_bool($sql))
- {
- return $sql;
- }
-
- return $this->db->query($sql);
- }
-
- // --------------------------------------------------------------------
-
- /**
* List databases
*
* @access public
@@ -129,7 +87,7 @@ class CI_DB_utility { if (is_bool($sql))
{
- return $sql;
+ show_error('db_must_use_set');
}
$query = $this->db->query($sql);
@@ -180,13 +138,12 @@ class CI_DB_utility { // --------------------------------------------------------------------
/**
- * Optimize Table
+ * Repair Table
*
* @access public
* @param string the table name
* @return bool
*/
-
function repair_table($table_name)
{
$sql = $this->_repair_table($table_name);
@@ -203,28 +160,7 @@ class CI_DB_utility { $res = $query->result_array();
return current($res);
}
-
- // --------------------------------------------------------------------
-
- /**
- * Drop Table
- *
- * @access public
- * @param string the table name
- * @return bool
- */
- function drop_table($table_name)
- {
- $sql = $this->_drop_table($table_name);
-
- if (is_bool($sql))
- {
- return $sql;
- }
- return $this->db->query($sql);
- }
-
// --------------------------------------------------------------------
/**
@@ -445,11 +381,6 @@ class CI_DB_utility { }
-
-
-
-
-
}
?>
\ No newline at end of file |