diff --git a/src/Medoo.php b/src/Medoo.php index 324d3697..1d3a4c28 100644 --- a/src/Medoo.php +++ b/src/Medoo.php @@ -856,7 +856,7 @@ protected function dataImplode(array $data, array &$map, string $conjunctor): st $isIndex = is_int($key); preg_match( - '/([\p{L}_][\p{L}\p{N}@$#\-_\.]*)(\[(?\>\=?|\<\=?|\!|\<\>|\>\<|\!?~|REGEXP)\])?([\p{L}_][\p{L}\p{N}@$#\-_\.]*)?/u', + '/([\p{L}_][\p{L}\p{N}@$#\-_\.]*)(\[(?\>\=?|\<\=?|\!|\<\>|\>\<|\!?~|REGEXP|IN|NOT IN)\])?([\p{L}_][\p{L}\p{N}@$#\-_\.]*)?/u', $isIndex ? $value : $key, $match ); @@ -965,6 +965,9 @@ protected function dataImplode(array $data, array &$map, string $conjunctor): st } elseif ($operator === 'REGEXP') { $stack[] = "{$column} REGEXP {$mapKey}"; $map[$mapKey] = [$value, PDO::PARAM_STR]; + } elseif ($operator === 'NOT IN' || $operator === 'IN') { + $raw = $this->buildRaw($value, $map); + $stack[] = "{$column} {$operator} {$raw}"; } continue;