mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 08:06:59 +02:00
Display error when getting row to edit
This commit is contained in:
@@ -82,9 +82,13 @@ if ($_POST["save"]) {
|
||||
}
|
||||
if ($select) {
|
||||
$result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1));
|
||||
$row = $result->fetch_assoc();
|
||||
if (!$row) { // MySQLi returns null
|
||||
$row = false;
|
||||
if (!$result) {
|
||||
$error = error();
|
||||
} else {
|
||||
$row = $result->fetch_assoc();
|
||||
if (!$row) { // MySQLi returns null
|
||||
$row = false;
|
||||
}
|
||||
}
|
||||
if (isset($_GET["select"]) && (!$row || $result->fetch_assoc())) { // $result->num_rows != 1 isn't available in all drivers
|
||||
$row = null;
|
||||
|
Reference in New Issue
Block a user