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/pdo/pdo_driver.php | 34 ------------------------------ 1 file changed, 34 deletions(-) (limited to 'system/database/drivers/pdo/pdo_driver.php') diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 5ba0cf8be..45f8cc1fb 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -640,40 +640,6 @@ class CI_DB_pdo_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 "; - $conditions .= implode("\n", $this->ar_where); - - if (count($where) > 0 && count($like) > 0) - { - $conditions .= " AND "; - } - - $conditions .= implode("\n", $like); - } - - $limit = ( ! $limit) ? '' : ' LIMIT '.$limit; - - return 'DELETE FROM '.$table.$conditions.$limit; - } - - // -------------------------------------------------------------------- - /** * Limit string * -- cgit v1.2.3-24-g4f1b