NULL
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@348 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
02a851c71e
commit
1704371aac
|
@ -13,7 +13,10 @@ function dump_table($table, $data = true) {
|
|||
$result = $mysql->query("SELECT * FROM " . idf_escape($table)); //! enum and set as numbers, binary as _binary
|
||||
if ($result) {
|
||||
while ($row = $result->fetch_row()) {
|
||||
echo "INSERT INTO " . idf_escape($table) . " VALUES ('" . implode("', '", array_map(array($mysql, 'escape_string'), $row)) . "');\n";
|
||||
foreach ($row as $key => $val) {
|
||||
$row[$key] = (isset($val) ? "'" . $mysql->escape_string($val) . "'" : "NULL");
|
||||
}
|
||||
echo "INSERT INTO " . idf_escape($table) . " VALUES (" . implode(", ", $row) . ");\n";
|
||||
}
|
||||
$result->free();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue