From d52b86214c867e7876d1c475f88a383d0bd2a4a2 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 26 May 2011 10:19:31 +1000 Subject: [PATCH] Upstream Patch: Enable database builder to use WHERE_IN --- .../database/classes/kohana/database/query/builder.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/kohana/modules/database/classes/kohana/database/query/builder.php b/includes/kohana/modules/database/classes/kohana/database/query/builder.php index 89fbbd8..48546b1 100644 --- a/includes/kohana/modules/database/classes/kohana/database/query/builder.php +++ b/includes/kohana/modules/database/classes/kohana/database/query/builder.php @@ -110,6 +110,10 @@ abstract class Kohana_Database_Query_Builder extends Database_Query { // Quote the min and max value $value = $min.' AND '.$max; } + elseif ($op === 'IN' AND is_array($value)) + { + $value = '('.implode(',',$value).')'; + } elseif ((is_string($value) AND array_key_exists($value, $this->_parameters)) === FALSE) { // Quote the value, it is not a parameter