diff options
author | Taufan Aditya <toopay@taufanaditya.com> | 2012-04-05 13:26:09 +0200 |
---|---|---|
committer | Taufan Aditya <toopay@taufanaditya.com> | 2012-04-05 13:26:09 +0200 |
commit | 62ca89126f4dbab0ed480c2f9399d1746d420870 (patch) | |
tree | 3aed175761bf01bbe9d1f6c8842131a09f060b40 /system/database/DB_active_rec.php | |
parent | 8b0aca770ad6089e759c22a6b69b97ba2623a195 (diff) | |
parent | 65d537ce35cc01c2f31144d695725255322cb792 (diff) |
Merge remote-tracking branch 'upstream/develop' into db-tests
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r-- | system/database/DB_active_rec.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index b324226ab..34a88ce59 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -1219,6 +1219,23 @@ abstract class CI_DB_active_record extends CI_DB_driver { // -------------------------------------------------------------------- /** + * Insert_batch 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_batch($table, $keys, $values) + { + return 'INSERT INTO '.$table.' ('.implode(', ', $keys).') VALUES '.implode(', ', $values); + } + + // -------------------------------------------------------------------- + + /** * The "set_insert_batch" function. Allows key/value pairs to be set for batch inserts * * @param mixed @@ -1341,6 +1358,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 * * This method is used by both insert() and get_compiled_insert() to |