diff --git a/adminer/drivers/pgsql.inc.php b/adminer/drivers/pgsql.inc.php index caeda875..d99efdd1 100644 --- a/adminer/drivers/pgsql.inc.php +++ b/adminer/drivers/pgsql.inc.php @@ -284,7 +284,7 @@ if (isset($_GET["pgsql"])) { function limit1($table, $query, $where, $separator = "\n") { return (preg_match('~^INTO~', $query) ? limit($query, $where, 1, 0, $separator) - : " $query" . (is_view(table_status1($table)) ? $where : " WHERE ctid = (SELECT ctid FROM " . table($table) . $where . $separator . "LIMIT 1)") + : " $query" . (is_view(table_status1($table)) ? $where : $separator . "WHERE ctid = (SELECT ctid FROM " . table($table) . $where . $separator . "LIMIT 1)") ); } diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 5a40aeff..d213ae96 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -382,7 +382,7 @@ if (!$columns && support("table")) { $key = "MD5(" . ($jush != 'sql' || preg_match("~^utf8~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset($connection) . ")") . ")"; $val = md5($val); } - $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key)); + $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val === false ? "f" : $val) : "null%5B%5D=" . urlencode($key)); } echo "