summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-09 12:36:31 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-09 12:36:31 +0200
commitea7a866f6107d4b50b4a7059f1373035aa12dd23 (patch)
treebf3c2d9f16d098358108f4ad609cf2b068c45ba6 /system/database/drivers/mysqli
parent9ac557f2473844f3c2207189f371f827dbaddb71 (diff)
parent580fe8ec482f5df7ca5b91e11b13b72a8f3ed0b8 (diff)
Merge changes from develop
Diffstat (limited to 'system/database/drivers/mysqli')
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 14949ecda..b5a1e26ed 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -475,6 +475,26 @@ class CI_DB_mysqli_driver extends CI_DB {
// --------------------------------------------------------------------
/**
+ * FROM tables
+ *
+ * Groups tables in FROM clauses if needed, so there is no confusion
+ * about operator precedence.
+ *
+ * @return string
+ */
+ protected function _from_tables()
+ {
+ if ( ! empty($this->qb_join) && count($this->qb_from) > 1)
+ {
+ return '('.implode(', ', $this->qb_from).')';
+ }
+
+ return implode(', ', $this->qb_from);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Close DB Connection
*
* @return void