diff --git a/ChangeLog b/ChangeLog index 936c4c078..06d734a86 100755 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ $Source$ * libraries/sql_query_form.lib.php: removed unneeded variable, dont display bookmark selection fieldset if no bookmark exists * libraries/session.inc.php: introduced PMA_secureSession() + * sql.php: bug #1305830 wrong db choosen 2005-09-27 Sebastian Mendel * libraries/sql_query_form.lib.php, db_details.php, server_sql.php diff --git a/sql.php b/sql.php index f4e46bdbb..c6bbd1b7b 100644 --- a/sql.php +++ b/sql.php @@ -364,9 +364,7 @@ else { $full_sql_query = $sql_query; } // end if...else - if ( isset( $_REQUEST['db'] ) ) { - PMA_DBI_select_db( $_REQUEST['db'] ); - } + PMA_DBI_select_db( $db ); // If the query is a DELETE query with no WHERE clause, get the number of // rows that will be deleted (mysql_affected_rows will always return 0 in