Rename real_escape_string() to escape_string()

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@125 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2007-07-11 11:36:09 +00:00
parent de5e18c2fd
commit 700570e1f5
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ function dump($db) {
$result1 = $mysql->query("SELECT * FROM " . idf_escape($row["Name"])); //! enum and set as numbers
if ($result1) {
while ($row1 = $result1->fetch_row()) {
echo "INSERT INTO " . idf_escape($row["Name"]) . " VALUES ('" . implode("', '", array_map(array($mysql, 'real_escape_string'), $row1)) . "');\n";
echo "INSERT INTO " . idf_escape($row["Name"]) . " VALUES ('" . implode("', '", array_map(array($mysql, 'escape_string'), $row1)) . "');\n";
}
$result1->free();
}

View file

@ -300,7 +300,7 @@ function process_input($name, $field) {
} elseif ($field["type"] == "enum") {
return (isset($_GET["default"]) ? "'" . $mysql->escape_string($value) . "'" : intval($value));
} elseif ($field["type"] == "set") {
return (isset($_GET["default"]) ? "'" . implode(",", array_map(array($mysql, 'real_escape_string'), (array) $value)) . "'" : array_sum((array) $value));
return (isset($_GET["default"]) ? "'" . implode(",", array_map(array($mysql, 'escape_string'), (array) $value)) . "'" : array_sum((array) $value));
} elseif (preg_match('~binary|blob~', $field["type"])) {
$file = get_file($name);
if (!is_string($file) && !$field["null"]) {