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);
    }