From c01d31685ad365c6bf3e833c03d7f8a3402c0ec7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 9 Apr 2012 12:55:11 +0300 Subject: Added a default _delete() method to CI_DB_active_record --- system/database/drivers/mysqli/mysqli_driver.php | 29 ------------------------ 1 file changed, 29 deletions(-) (limited to 'system/database/drivers/mysqli/mysqli_driver.php') diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php index 50e213641..a690682be 100644 --- a/system/database/drivers/mysqli/mysqli_driver.php +++ b/system/database/drivers/mysqli/mysqli_driver.php @@ -502,35 +502,6 @@ class CI_DB_mysqli_driver extends CI_DB { // -------------------------------------------------------------------- - /** - * Delete statement - * - * Generates a platform-specific delete string from the supplied data - * - * @param string the table name - * @param array the where clause - * @param string the limit clause - * @return string - */ - protected function _delete($table, $where = array(), $like = array(), $limit = FALSE) - { - $conditions = ''; - if (count($where) > 0 OR count($like) > 0) - { - $conditions = "\nWHERE ".implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= ' AND '; - } - $conditions .= implode("\n", $like); - } - - return 'DELETE FROM '.$table.$conditions.( ! $limit ? '' : ' LIMIT '.$limit); - } - - // -------------------------------------------------------------------- - /** * Limit string * -- cgit v1.2.3-24-g4f1b