$input = "\\'"; # these two backslashes will print a single backslash in the SQL, but, as I will add one backslash before the single quote, the result there will be just the same as you can see here.