1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

Avoid fatal errors

This commit is contained in:
Jakub Vrana
2010-10-13 17:53:59 +02:00
parent d2e49b1dc8
commit b0d637b638
20 changed files with 164 additions and 221 deletions

View File

@@ -58,11 +58,8 @@ if ($_POST["save"]) {
}
$row = array();
if ($select) {
$result = $connection->query("SELECT" . limit(implode(", ", $select) . " FROM " . table($TABLE), " WHERE $where", (isset($_GET["select"]) ? 2 : 1)));
$row = $result->fetch_assoc();
if (isset($_GET["select"]) && $result->fetch_assoc()) {
$row = null;
}
$rows = get_rows("SELECT" . limit(implode(", ", $select) . " FROM " . table($TABLE), " WHERE $where", (isset($_GET["select"]) ? 2 : 1)));
$row = (isset($_GET["select"]) && count($rows) != 1 ? null : reset($rows));
}
}
?>