PHPDaemon\Clients\MySQL\Pool::likeEscape PHP Method

likeEscape() public static method

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