summaryrefslogtreecommitdiffstats
path: root/system/database/DB_utility.php
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-01-16 22:10:09 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-01-16 22:10:09 +0100
commit39b622db9bda38282a32bb45623da63efe685729 (patch)
tree0d1a1729dc544ebfd1d3dfb11b2ff78759bcf7be /system/database/DB_utility.php
parentf4615fec22671262e95d3a852f8b9088314118f2 (diff)
Many new Active Record functions, and another whack of stuff
Diffstat (limited to 'system/database/DB_utility.php')
-rw-r--r--system/database/DB_utility.php79
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