downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SphinxClient::getLastError> <SphinxClient::__construct
[edit] Last updated: Fri, 17 May 2013

view this page in

SphinxClient::escapeString

(PECL sphinx >= 0.1.0)

SphinxClient::escapeStringEscape special characters

Descrierea

public string SphinxClient::escapeString ( string $string )

Escapes characters that are treated as special operators by the query language parser.

Parametri

string

String to escape.

Valorile întoarse

Returns escaped string.



add a note add a note User Contributed Notes SphinxClient::escapeString - [1 notes]
up
1
xxxbunker dot com
3 years ago
according to http://www.sphinxsearch.com/forum/view.html?id=5225:

this function doesn't really do what one would expect (mysql_real_escape_string style) and is more meant to escape individual keywords...

my experience it works better to manually escape reserved characters, for example:

<?php
$string
='make big $ online';

$escaped=str_replace('$','\\$',$string);
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites