check for databases after query
This commit is contained in:
@@ -10,6 +10,9 @@ $Source$
|
|||||||
* tbl_replace.php, tbl_replace_fields.php: Fixed #857445, #857684
|
* tbl_replace.php, tbl_replace_fields.php: Fixed #857445, #857684
|
||||||
where non-existant fields caused PHP notices.
|
where non-existant fields caused PHP notices.
|
||||||
* db_details.php: Removed unneccessary whitespace
|
* 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>
|
2003-12-10 Garvin Hicking <me@supergarv.de>
|
||||||
* db_datadict.php: Bug 857186: Real fix for the problem. The '@'
|
* db_datadict.php: Bug 857186: Real fix for the problem. The '@'
|
||||||
|
2
sql.php
2
sql.php
@@ -345,7 +345,7 @@ else {
|
|||||||
// This could happen if the user sends a query like "USE `database`;"
|
// This could happen if the user sends a query like "USE `database`;"
|
||||||
$res = PMA_mysql_query('SELECT DATABASE() AS "db";');
|
$res = PMA_mysql_query('SELECT DATABASE() AS "db";');
|
||||||
$row = PMA_mysql_fetch_array($res);
|
$row = PMA_mysql_fetch_array($res);
|
||||||
if ($db != $row['db']) {
|
if (is_array($row) && isset($row['db']) && $db != $row['db']) {
|
||||||
$db = $row['db'];
|
$db = $row['db'];
|
||||||
$reload = 1;
|
$reload = 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user