diff --git a/lib/Doctrine/Hook/WordLike.php b/lib/Doctrine/Hook/WordLike.php index 8257011a1..66aa55445 100644 --- a/lib/Doctrine/Hook/WordLike.php +++ b/lib/Doctrine/Hook/WordLike.php @@ -50,7 +50,7 @@ class Doctrine_Hook_WordLike extends Doctrine_Hook_Parser_Complex $value = Doctrine_Tokenizer::bracketTrim($value, "'", "'"); $a[] = $alias . '.' . $field . ' LIKE ?'; - $this->params[] = $value . '%'; + $this->params[] = '%' . $value . '%'; } else { $e2 = explode(' ',$value); @@ -58,9 +58,9 @@ class Doctrine_Hook_WordLike extends Doctrine_Hook_Parser_Complex foreach ($e2 as $v) { $v = trim($v); $a[] = $alias . '.' . $field . ' LIKE ?'; - $this->params[] = $v . '%'; + $this->params[] = '%' . $v . '%'; } } return implode(' OR ', $a); } -} \ No newline at end of file +}