check for databases after query

This commit is contained in:
Garvin Hicking
2003-12-11 11:16:25 +00:00
parent 01d9e0a134
commit 079c662908
2 changed files with 5 additions and 2 deletions

View File

@@ -10,7 +10,10 @@ $Source$
* tbl_replace.php, tbl_replace_fields.php: Fixed #857445, #857684
where non-existant fields caused PHP notices.
* db_details.php: Removed unneccessary whitespace
* sql.php: Bug #857742: When dropping the only remaining database, an
error occured. Fixed by checking if databases remein (as suggested
by lem9)
2003-12-10 Garvin Hicking <me@supergarv.de>
* db_datadict.php: Bug 857186: Real fix for the problem. The '@'
delimiter slipped to the replacement's end instead of the expression's

View File

@@ -345,7 +345,7 @@ else {
// This could happen if the user sends a query like "USE `database`;"
$res = PMA_mysql_query('SELECT DATABASE() AS "db";');
$row = PMA_mysql_fetch_array($res);
if ($db != $row['db']) {
if (is_array($row) && isset($row['db']) && $db != $row['db']) {
$db = $row['db'];
$reload = 1;
}