Last active
August 29, 2015 14:08
-
-
Save sbellver/570f810702ca0af7d6b9 to your computer and use it in GitHub Desktop.
Limpia caracteres para pasar de postgres a mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Limpia los insert para pasar de Postgres a Mysql</title> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<? | |
$str = "Cadena de Insert a cambiar"; | |
$str = str_replace("\xe2\x80\x8b", '', $str); | |
$str = str_replace("\xCC\x81n", '', $str); | |
$str = str_replace("\xCC\x81s", '', $str); | |
$str = str_replace("\xCC\x81", '', $str); | |
$str = str_replace("'t'", '1', $str); | |
$str = str_replace("'f'", '0', $str); | |
echo $str; | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment