1
0
mirror of synced 2024-12-14 15:16:04 +03:00
This commit is contained in:
zYne 2007-11-14 20:43:20 +00:00
parent d862b013d0
commit b2c275583e

View File

@ -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,7 +58,7 @@ 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);