From 4d85ab211570c8813d93187cf54cf1dc9abb9ce1 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 30 Mar 2002 13:16:47 +0000 Subject: [PATCH] put back mysql_select_db --- ChangeLog | 3 +++ tbl_properties.php3 | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e67f77e6a..21b763af3 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-03-30 Marc Delisle + * tbl_properties.php3, comments about why we need a mysql_select_db() + 2002-03-30 Loïc Chapeaux * libraries/zip.lib.php3: optimized a bit. * confic.inc.php3: reordered some directives. diff --git a/tbl_properties.php3 b/tbl_properties.php3 index 4249856b5..1eaa15e71 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -26,7 +26,7 @@ $err_url = 'tbl_properties.php3' /** * Ensures the database and the table exist (else move to the "parent" script) - * and diplays headers + * and displays headers */ if (!isset($is_db) || !$is_db) { // Not a valid db name -> back to the welcome page @@ -1215,7 +1215,12 @@ if (!empty($cfgServer['relation'])) { $local_query = 'SELECT src_column, dest_table, dest_column' . ' FROM ' . $cfgServer['relation'] . ' WHERE src_table =\'' . $table . '\';'; -// mysql_select_db($db); + +// we need this mysql_select_db if the user has access to more than one db +// and $db is not the last of the list, because +// PMA_availableDatabases() has made a mysql_select_db() on the last one + mysql_select_db($db); + $result = @mysql_query($local_query); if ($result != FALSE && mysql_num_rows($result) > 0) {