diff --git a/classes/class_sphinxql.php b/classes/class_sphinxql.php index 16a92874..b6508a45 100644 --- a/classes/class_sphinxql.php +++ b/classes/class_sphinxql.php @@ -244,11 +244,18 @@ public function where_between($Attribute, $Values) { * @param string $Field field to match $Expr against. Default is *, which means all available fields * @return current SphinxQL query object */ - public function where_match($Expr, $Field = '*') { + public function where_match($Expr, $Field = '*', $Escape = true) { if(empty($Expr)) { return $this; } - $this->Expressions[] = "@$Field ".SphinxQL::escape_string($Expr); + if ($Field !== false) { + $Field = "@$Field "; + } + if ($Escape === true) { + $this->Expressions[] = "$Field".SphinxQL::escape_string($Expr); + } else { + $this->Expressions[] = $Field.$Expr; + } return $this; } diff --git a/sections/tools/tools.php b/sections/tools/tools.php index 59e0edcf..9ae07623 100644 --- a/sections/tools/tools.php +++ b/sections/tools/tools.php @@ -89,9 +89,8 @@