note 96753 modified in sphinxclient.escapestring by danbrown

From: Date: Mon, 15 Mar 2010 16:26:28 +0000
Subject: note 96753 modified in sphinxclient.escapestring by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-167048@lists.php.net to get a copy of this message
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); ?> --was-- 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: $string='make big $ online'; $escaped=str_replace('$','\\$',$string); http://php.net/manual/en/sphinxclient.escapestring.php

« previous php.notes (#167048) next »