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:
@@ -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) : ""));
|
||||
}
|
||||
|
Reference in New Issue
Block a user