summaryrefslogtreecommitdiffstats
path: root/system/database/DB_active_rec.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-04-05 14:17:25 +0200
committerAndrey Andreev <narf@bofh.bg>2012-04-05 14:17:25 +0200
commita3bca8f8c1e4cca5d763cbfe043999cbfd07cd21 (patch)
tree5032c1b72ac404540eea102e941eca617ba4699a /system/database/DB_active_rec.php
parent975034d50ed7b3c530631ba3e24a73e33be24eff (diff)
Replaced driver instances of _replace() with one in CI_DB_active_record
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r--system/database/DB_active_rec.php33
1 files changed, 25 insertions, 8 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 22b57082e..f5dcd3dd7 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -1223,10 +1223,10 @@ abstract class CI_DB_active_record extends CI_DB_driver {
*
* 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
+ * @param string the table name
+ * @param array the insert keys
+ * @param array the insert values
+ * @return string
*/
protected function _insert_batch($table, $keys, $values)
{
@@ -1362,10 +1362,10 @@ abstract class CI_DB_active_record extends CI_DB_driver {
*
* 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
+ * @param string the table name
+ * @param array the insert keys
+ * @param array the insert values
+ * @return string
*/
protected function _insert($table, $keys, $values)
{
@@ -1447,6 +1447,23 @@ abstract class CI_DB_active_record extends CI_DB_driver {
// --------------------------------------------------------------------
/**
+ * Replace statement
+ *
+ * Generates a platform-specific replace string from the supplied data
+ *
+ * @param string the table name
+ * @param array the insert keys
+ * @param array the insert values
+ * @return string
+ */
+ protected function _replace($table, $keys, $values)
+ {
+ return 'REPLACE INTO '.$table.' ('.implode(', ', $keys).') VALUES ('.implode(', ', $values).')';
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Get UPDATE query string
*
* Compiles an update query and returns the sql