put back mysql_select_db

This commit is contained in:
Marc Delisle
2002-03-30 13:16:47 +00:00
parent a51d18fe84
commit 4d85ab2115
2 changed files with 10 additions and 2 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-03-30 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties.php3, comments about why we need a mysql_select_db()
2002-03-30 Lo<4C>c Chapeaux <lolo@phpheaven.net> 2002-03-30 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/zip.lib.php3: optimized a bit. * libraries/zip.lib.php3: optimized a bit.
* confic.inc.php3: reordered some directives. * confic.inc.php3: reordered some directives.

View File

@@ -26,7 +26,7 @@ $err_url = 'tbl_properties.php3'
/** /**
* Ensures the database and the table exist (else move to the "parent" script) * 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) { if (!isset($is_db) || !$is_db) {
// Not a valid db name -> back to the welcome page // 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' $local_query = 'SELECT src_column, dest_table, dest_column'
. ' FROM ' . $cfgServer['relation'] . ' FROM ' . $cfgServer['relation']
. ' WHERE src_table =\'' . $table . '\';'; . ' 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); $result = @mysql_query($local_query);
if ($result != FALSE && mysql_num_rows($result) > 0) { if ($result != FALSE && mysql_num_rows($result) > 0) {