summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-05-17 15:46:28 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-05-17 15:46:28 +0200
commit918eaef728eaf49387083b39add7106e029fcfb4 (patch)
treebd7ae7ad33977cf04cd44a735ccc1465ab7b4ffc /system/database/DB_driver.php
parent0199f68db46d375af2d4cb831c679d3040601f25 (diff)
parent324ef078dda5a3596444152ba49dd591a61adba6 (diff)
Merge branch 'release/2.1.1'
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php36
1 files changed, 28 insertions, 8 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 3680b85c2..6161f149b 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -265,6 +265,12 @@ class CI_DB_driver {
$sql = preg_replace("/(\W)".$this->swap_pre."(\S+?)/", "\\1".$this->dbprefix."\\2", $sql);
}
+ // Compile binds if needed
+ if ($binds !== FALSE)
+ {
+ $sql = $this->compile_binds($sql, $binds);
+ }
+
// Is query caching enabled? If the query is a "read type"
// we will load the caching class and return the previously
// cached query if it exists
@@ -280,12 +286,6 @@ class CI_DB_driver {
}
}
- // Compile binds if needed
- if ($binds !== FALSE)
- {
- $sql = $this->compile_binds($sql, $binds);
- }
-
// Save the query for debugging
if ($this->save_queries == TRUE)
{
@@ -1015,8 +1015,14 @@ class CI_DB_driver {
else
{
$args = (func_num_args() > 1) ? array_splice(func_get_args(), 1) : null;
-
- return call_user_func_array($function, $args);
+ if (is_null($args))
+ {
+ return call_user_func($function);
+ }
+ else
+ {
+ return call_user_func_array($function, $args);
+ }
}
}
@@ -1381,7 +1387,21 @@ class CI_DB_driver {
return $item.$alias;
}
+
+ // --------------------------------------------------------------------
+ /**
+ * Dummy method that allows Active Record class to be disabled
+ *
+ * This function is used extensively by every db driver.
+ *
+ * @access private
+ * @return void
+ */
+ protected function _reset_select()
+ {
+
+ }
}