From 65d537ce35cc01c2f31144d695725255322cb792 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 5 Apr 2012 14:11:41 +0300 Subject: Replaced driver instances of _insert() with one in CI_DB_active_record --- system/database/DB_active_rec.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'system/database/DB_active_rec.php') diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 2bb891309..34a88ce59 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -1230,7 +1230,7 @@ abstract class CI_DB_active_record extends CI_DB_driver { */ protected function _insert_batch($table, $keys, $values) { - return 'INSERT INTO '.$this->protect_identifiers($table).' ('.implode(', ', $keys).') VALUES '.implode(', ', $values); + return 'INSERT INTO '.$table.' ('.implode(', ', $keys).') VALUES '.implode(', ', $values); } // -------------------------------------------------------------------- @@ -1357,6 +1357,23 @@ abstract class CI_DB_active_record extends CI_DB_driver { // -------------------------------------------------------------------- + /** + * Insert statement + * + * Generates a platform-specific insert string from the supplied data + * + * @param string the table name + * @param array the insert keys + * @param array the insert values + * @return string + */ + protected function _insert($table, $keys, $values) + { + return 'INSERT INTO '.$table.' ('.implode(', ', $keys).') VALUES ('.implode(', ', $values).')'; + } + + // -------------------------------------------------------------------- + /** * Validate Insert * -- cgit v1.2.3-24-g4f1b