From 417b29fe657e614b3dd830681c2e41c4d32e4636 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 17 Apr 2011 04:36:48 +0200 Subject: [PATCH] Fix 'Commands out of sync' (thanks to Vlasta Neubauer) --- adminer/call.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/adminer/call.inc.php b/adminer/call.inc.php index 0620b441..8feb3293 100644 --- a/adminer/call.inc.php +++ b/adminer/call.inc.php @@ -33,10 +33,14 @@ if (!$error && $_POST) { if (!$connection->multi_query($query)) { echo "

" . error() . "\n"; } else { + $connection2 = connect(); + if (is_object($connection2)) { + $connection2->select_db(DB); + } do { $result = $connection->store_result(); if (is_object($result)) { - select($result); + select($result, $connection2); } else { echo "

" . lang('Routine has been called, %d row(s) affected.', $connection->affected_rows) . "\n"; }