1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 17:14:07 +02:00

Use extended INSERT in select export

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@695 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-06-15 10:01:55 +00:00
parent 861171612d
commit fa5c952af0
3 changed files with 7 additions and 6 deletions

View File

@@ -74,9 +74,11 @@ if ($_POST && !$error) {
dump_table($_GET["select"], "");
$query = "SELECT " . ($select ? implode(", ", $select) : "*") . " FROM " . idf_escape($_GET["select"]);
if (is_array($_POST["check"])) {
$union = array();
foreach ($_POST["check"] as $val) {
dump_data($_GET["select"], "INSERT", "$query WHERE " . implode(" AND ", where_check($val)) . " LIMIT 1");
$union[] = "($query WHERE " . implode(" AND ", where_check($val)) . " LIMIT 1)";
}
dump_data($_GET["select"], "INSERT", implode(" UNION ALL ", $union));
} else {
dump_data($_GET["select"], "INSERT", $query . ($where ? " WHERE " . implode(" AND ", $where) : ""));
}