summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-30 01:26:28 +0200
committeradmin <devnull@localhost>2006-09-30 01:26:28 +0200
commit3ed8c51254a5b26d951fa675802fcf69adf9638e (patch)
tree8e5f5af90a7e73f4b1a55f78fa3542f5cb156cfa /system/database/DB_driver.php
parent051402b4c281cf125c9b369b682128aaefb587cd (diff)
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 94db84bbf..275d51c53 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -45,6 +45,7 @@ class CI_DB_driver {
var $query_count = 0;
var $bind_marker = '?';
var $queries = array();
+ var $cache = array();
var $trans_enabled = TRUE;
var $_trans_depth = 0;
var $_trans_failure = FALSE; // Used with transactions to determine if a rollback should occur
@@ -563,6 +564,12 @@ class CI_DB_driver {
*/
function field_names($table = '')
{
+ // Is there a cached result?
+ if (isset($this->cache['field_names'][$table]))
+ {
+ return $this->cache['field_names'][$table];
+ }
+
if ($table == '')
{
if ($this->db_debug)
@@ -596,7 +603,7 @@ class CI_DB_driver {
}
}
- return $retval;
+ return $this->cache['field_names'][$table] =& $retval;
}
// --------------------------------------------------------------------