mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 19:13:59 +02:00
NULL
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@348 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user