diff options
author | Andrey Andreev <narf@devilix.net> | 2016-01-06 13:51:27 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-01-06 13:51:27 +0100 |
commit | 0ca9ae6ca109177eb0e80456b097a9d63412517e (patch) | |
tree | 9c170e7d16a14751f78b2297d40df767d875e4fc /system/database/drivers/odbc | |
parent | 0b1efb38293416b13aee8d1d9505e97d2efade5f (diff) |
Fix #4337
Diffstat (limited to 'system/database/drivers/odbc')
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 18 |
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 |