]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Fix condition for selecting no rows
authorJakub Vrana <jakub@vrana.cz>
Tue, 6 Feb 2018 11:43:10 +0000 (12:43 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 6 Feb 2018 11:43:10 +0000 (12:43 +0100)
adminer/include/adminer.inc.php
changes.txt
editor/include/adminer.inc.php

index 4475d7ff7eac844cad189073d858aa3d945973b9..645281bfea0627746ccb3b9cb48cdca8055d0ce0 100644 (file)
@@ -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");
                                }
                        }
                }
index 033cb7c89a80bafab8f4d46e89308d26cf8edfdb..71a965fda5fb799467e80130b1922e3ee423edb4 100644 (file)
@@ -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
index 2117bf29cbbac1a1e6960aecd074a6865911455d..241e917bb6f2ccbc48797c3ce922fa9dcc337c0b 100644 (file)
@@ -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;