From c34ada5368c445cd189edf8eda2b5dfaefde5910 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 6 Feb 2018 12:43:10 +0100 Subject: [PATCH] PostgreSQL: Fix condition for selecting no rows --- adminer/include/adminer.inc.php | 2 +- changes.txt | 1 + editor/include/adminer.inc.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 4475d7ff..645281bf 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -550,7 +550,7 @@ class Adminer { $cols[] = $prefix . ($jush == "sql" && $is_text && !preg_match("~^utf8~", $field["collation"]) ? "CONVERT($name USING " . charset($connection) . ")" : $name) . $cond; } } - $return[] = ($cols ? "(" . implode(" OR ", $cols) . ")" : "0"); + $return[] = ($cols ? "(" . implode(" OR ", $cols) . ")" : "1 = 0"); } } } diff --git a/changes.txt b/changes.txt index 033cb7c8..71a965fd 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ Adminer 4.6.1-dev: PostgreSQL: Don't treat interval type as number (bug #474) +PostgreSQL: Fix condition for selecting no rows Adminer 4.6.0 (released 2018-02-05): Fix counting selected rows after going back to select page diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 2117bf29..241e917b 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -360,7 +360,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 } } } - $return[] = ($conds ? "(" . implode(" OR ", $conds) . ")" : "0"); + $return[] = ($conds ? "(" . implode(" OR ", $conds) . ")" : "1 = 0"); } } return $return;