check for databases after query
This commit is contained in:
@@ -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
|
||||
|
2
sql.php
2
sql.php
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user