Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
catfan committed Sep 5, 2016
2 parents 14c0694 + ab90cdf commit 2601ffd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions medoo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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('/^(?!(%|\[|_])).+(?<!(%|\]|_))$/', $item))
{
Expand All @@ -378,18 +377,22 @@ protected function data_implode($data, $conjunctor, $outer_conjunctor = null)

if (in_array($operator, array('>', '>=', '<', '<=')))
{
$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
Expand Down

0 comments on commit 2601ffd

Please sign in to comment.