From a1170aff602317d9b6f2d5c1d5cc60d3dc82ee58 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 2 Jul 2015 11:46:56 +0300 Subject: Fix QB delete() for multiple tables with where() Reported via the forums: http://forum.codeigniter.com/thread-61774.html --- system/database/DB_query_builder.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'system/database/DB_query_builder.php') diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php index 859f9f564..a8b5b3579 100644 --- a/system/database/DB_query_builder.php +++ b/system/database/DB_query_builder.php @@ -2092,10 +2092,13 @@ abstract class CI_DB_query_builder extends CI_DB_driver { } elseif (is_array($table)) { + empty($where) && $reset_data = FALSE; + foreach ($table as $single_table) { $this->delete($single_table, $where, $limit, $reset_data); } + return; } else -- cgit v1.2.3-24-g4f1b