summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mysqli
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/mysqli')
-rw-r--r--system/database/drivers/mysqli/mysqli_driver.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index f6f106eba..ebed81390 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -456,9 +456,11 @@ class CI_DB_mysqli_driver extends CI_DB {
* @param array the where clause
* @return string
*/
- function _delete($table, $where)
+ function _delete($table, $where, $limit = FALSE)
{
- return "DELETE FROM ".$this->_escape_table($table)." WHERE ".implode(" ", $where);
+ $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+
+ return "DELETE FROM ".$this->_escape_table($table)." WHERE ".implode(" ", $where).$limit;
}
// --------------------------------------------------------------------