diff options
Diffstat (limited to 'system/database/drivers')
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 22 | ||||
-rw-r--r-- | system/database/drivers/mysql/mysql_driver.php | 22 | ||||
-rw-r--r-- | system/database/drivers/mysqli/mysqli_driver.php | 22 | ||||
-rw-r--r-- | system/database/drivers/oci8/oci8_driver.php | 22 | ||||
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 22 | ||||
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 22 | ||||
-rw-r--r-- | system/database/drivers/sqlite/sqlite_driver.php | 22 |
7 files changed, 154 insertions, 0 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index e0c4db75c..ad747d4ad 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -439,6 +439,28 @@ class CI_DB_mssql_driver extends CI_DB { // --------------------------------------------------------------------
/**
+ * From Tables
+ *
+ * This function implicitly groups FROM tables so there is no confusion
+ * about operator precedence in harmony with SQL standards
+ *
+ * @access public
+ * @param type
+ * @return type
+ */
+ function _from_tables($tables)
+ {
+ if (! is_array($tables))
+ {
+ $tables = array($tables);
+ }
+
+ return implode(', ', $tables);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Insert statement
*
* Generates a platform-specific insert string from the supplied data
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php index 6e53537b4..f00257250 100644 --- a/system/database/drivers/mysql/mysql_driver.php +++ b/system/database/drivers/mysql/mysql_driver.php @@ -480,6 +480,28 @@ class CI_DB_mysql_driver extends CI_DB { // --------------------------------------------------------------------
/**
+ * From Tables
+ *
+ * This function implicitly groups FROM tables so there is no confusion
+ * about operator precedence in harmony with SQL standards
+ *
+ * @access public
+ * @param type
+ * @return type
+ */
+ function _from_tables($tables)
+ {
+ if (! is_array($tables))
+ {
+ $tables = array($tables);
+ }
+
+ return '('.implode(', ', $tables).')';
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Insert statement
*
* Generates a platform-specific insert string from the supplied data
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index d645cc820..b2e97f927 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -474,6 +474,28 @@ class CI_DB_mysqli_driver extends CI_DB { // --------------------------------------------------------------------
/**
+ * From Tables
+ *
+ * This function implicitly groups FROM tables so there is no confusion
+ * about operator precedence in harmony with SQL standards
+ *
+ * @access public
+ * @param type
+ * @return type
+ */
+ function _from_tables($tables)
+ {
+ if (! is_array($tables))
+ {
+ $tables = array($tables);
+ }
+
+ return '('.implode(', ', $tables).')';
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Insert statement
*
* Generates a platform-specific insert string from the supplied data
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 99f7d57bd..ddc0fba99 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -585,6 +585,28 @@ class CI_DB_oci8_driver extends CI_DB { // --------------------------------------------------------------------
/**
+ * From Tables
+ *
+ * This function implicitly groups FROM tables so there is no confusion
+ * about operator precedence in harmony with SQL standards
+ *
+ * @access public
+ * @param type
+ * @return type
+ */
+ function _from_tables($tables)
+ {
+ if (! is_array($tables))
+ {
+ $tables = array($tables);
+ }
+
+ return '('.implode(', ', $tables).')';
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Insert statement
*
* Generates a platform-specific insert string from the supplied data
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 604dd778c..03c0e6a86 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -450,6 +450,28 @@ class CI_DB_odbc_driver extends CI_DB { // --------------------------------------------------------------------
/**
+ * From Tables
+ *
+ * This function implicitly groups FROM tables so there is no confusion
+ * about operator precedence in harmony with SQL standards
+ *
+ * @access public
+ * @param type
+ * @return type
+ */
+ function _from_tables($tables)
+ {
+ if (! is_array($tables))
+ {
+ $tables = array($tables);
+ }
+
+ return '('.implode(', ', $tables).')';
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Insert statement
*
* Generates a platform-specific insert string from the supplied data
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 96cf2dfe9..20f91650a 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -470,6 +470,28 @@ class CI_DB_postgre_driver extends CI_DB { // --------------------------------------------------------------------
/**
+ * From Tables
+ *
+ * This function implicitly groups FROM tables so there is no confusion
+ * about operator precedence in harmony with SQL standards
+ *
+ * @access public
+ * @param type
+ * @return type
+ */
+ function _from_tables($tables)
+ {
+ if (! is_array($tables))
+ {
+ $tables = array($tables);
+ }
+
+ return '('.implode(', ', $tables).')';
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Insert statement
*
* Generates a platform-specific insert string from the supplied data
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php index 9cc69bb63..38febca29 100644 --- a/system/database/drivers/sqlite/sqlite_driver.php +++ b/system/database/drivers/sqlite/sqlite_driver.php @@ -466,6 +466,28 @@ class CI_DB_sqlite_driver extends CI_DB { // --------------------------------------------------------------------
/**
+ * From Tables
+ *
+ * This function implicitly groups FROM tables so there is no confusion
+ * about operator precedence in harmony with SQL standards
+ *
+ * @access public
+ * @param type
+ * @return type
+ */
+ function _from_tables($tables)
+ {
+ if (! is_array($tables))
+ {
+ $tables = array($tables);
+ }
+
+ return '('.implode(', ', $tables).')';
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Insert statement
*
* Generates a platform-specific insert string from the supplied data
|