diff --git a/medoo.php b/medoo.php index 6eaf147d..a57941fc 100644 --- a/medoo.php +++ b/medoo.php @@ -2,7 +2,7 @@ /*! * Medoo database framework * http://medoo.in - * Version 1.1.2 + * Version 1.1.3 * * Copyright 2016, Angel Lai * Released under the MIT license @@ -363,7 +363,6 @@ protected function data_implode($data, $conjunctor, $outer_conjunctor = null) foreach ($value as $item) { $item = strval($item); - $suffix = mb_substr($item, -1, 1); if (preg_match('/^(?!(%|\[|_])).+(?', '>=', '<', '<='))) { + $condition = $column . ' ' . $operator . ' '; + if (is_numeric($value)) { - $wheres[] = $column . ' ' . $operator . ' ' . $value; + $condition .= $value; } elseif (strpos($key, '#') === 0) { - $wheres[] = $column . ' ' . $operator . ' ' . $this->fn_quote($key, $value); + $condition .= $this->fn_quote($key, $value); } else { - $wheres[] = $column . ' ' . $operator . ' ' . $this->quote($value); + $condition .= $this->quote($value); } + + $wheres[] = $condition; } } else