summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-06 11:48:32 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-06 11:48:32 +0100
commit083e3c8d39a4fb9f8ef37f61f0ea42ec3fe1389f (patch)
tree5a3d50a32b9ef1cd3fb7afa473a11d48a3099620 /system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
parentbdd9c118c6e04ec8dc9b6bb1a2fb8a39214dca72 (diff)
Fix #589
Diffstat (limited to 'system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php')
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
index b8c60c6b2..65825dd34 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
@@ -296,6 +296,29 @@ class CI_DB_pdo_sqlsrv_driver extends CI_DB_pdo_driver {
return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$limit.' ', $sql);
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Insert batch statement
+ *
+ * Generates a platform-specific insert string from the supplied data.
+ *
+ * @param string $table Table name
+ * @param array $keys INSERT keys
+ * @param array $values INSERT values
+ * @return string|bool
+ */
+ protected function _insert_batch($table, $keys, $values)
+ {
+ // Multiple-value inserts are only supported as of SQL Server 2008
+ if (version_compare($this->version(), '10', '>='))
+ {
+ return parent::_insert_batch($table, $keys, $values);
+ }
+
+ return ($this->db->db_debug) ? $this->db->display_error('db_unsuported_feature') : FALSE;
+ }
+
}
/* End of file pdo_sqlsrv_driver.php */