From c8c4be783962598d7efb7610975d7debb0604e26 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Mon, 20 Jul 2009 14:31:05 +0000 Subject: [PATCH] Admit setting of foreign_key_checks git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@855 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/db.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/db.inc.php b/adminer/db.inc.php index 684b8543..abe08d81 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -4,8 +4,8 @@ $tables_views = array_merge((array) $_POST["tables"], (array) $_POST["views"]); if ($tables_views && !$error) { $result = true; $message = ""; - if (count((array) $_POST["tables"]) > 1) { - $dbh->query("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once + if (count($_POST["tables"]) > 1) { + queries("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once } if (isset($_POST["truncate"])) { if ($_POST["tables"]) {