PHPDaemon\Clients\MySQL\Pool::likeEscape PHP Метод

likeEscape() публичный статический Метод

Escapes the special symbols with a trailing backslash
public static likeEscape ( string $string ) : string
$string string
Результат string
    public static function likeEscape($string)
    {
        static $sqlescape = ["" => '\\0', "\n" => '\\n', "\r" => '\\r', '\\' => '\\\\', '\'' => '\\\'', '"' => '\\"', '%' => '\\%', '_' => '\\_'];
        return strtr($string, $sqlescape);
    }