summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/odbc
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/odbc')
-rw-r--r--system/database/drivers/odbc/odbc_driver.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index 409284b44..e12ad53bc 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -189,6 +189,24 @@ class CI_DB_odbc_driver extends CI_DB {
// --------------------------------------------------------------------
/**
+ * Determines if a query is a "write" type.
+ *
+ * @param string An SQL query string
+ * @return bool
+ */
+ public function is_write_type($sql)
+ {
+ if (preg_match('#^(INSERT|UPDATE).*RETURNING\s.+(\,\s?.+)*$#i', $sql))
+ {
+ return FALSE;
+ }
+
+ return parent::is_write_type($sql);
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Platform-dependant string escape
*
* @param string