mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Disable foreign_key_checks only with several tables
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@738 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -4,7 +4,9 @@ $tables_views = array_merge((array) $_POST["tables"], (array) $_POST["views"]);
|
|||||||
if ($tables_views && !$error) {
|
if ($tables_views && !$error) {
|
||||||
$result = true;
|
$result = true;
|
||||||
$message = "";
|
$message = "";
|
||||||
|
if (count((array) $_POST["tables"]) > 1) {
|
||||||
$dbh->query("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once
|
$dbh->query("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once
|
||||||
|
}
|
||||||
if (isset($_POST["truncate"])) {
|
if (isset($_POST["truncate"])) {
|
||||||
if ($_POST["tables"]) {
|
if ($_POST["tables"]) {
|
||||||
foreach ($_POST["tables"] as $table) {
|
foreach ($_POST["tables"] as $table) {
|
||||||
|
Reference in New Issue
Block a user