summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-11-08 15:49:24 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-11-08 15:49:24 +0100
commitd0b61ef16e247d5252c7505ac8e13517ce26ff04 (patch)
treee84ff20e8f8e1bbc682e9c76c4064a65e6c24604
parent1a160c9bc2b0817c822365b7aae5866af830d2cd (diff)
Added ->db->replace() for MySQLi.
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index ccd110f79..d3200f328 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -570,6 +570,25 @@ class CI_DB_mysqli_driver extends CI_DB {
{
return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES ".implode(', ', $values);
}
+
+ // --------------------------------------------------------------------
+
+
+ /**
+ * Replace statement
+ *
+ * Generates a platform-specific replace string from the supplied data
+ *
+ * @access public
+ * @param string the table name
+ * @param array the insert keys
+ * @param array the insert values
+ * @return string
+ */
+ function _replace($table, $keys, $values)
+ {
+ return "REPLACE INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
+ }
// --------------------------------------------------------------------