PostgreSQL: Fix condition for selecting no rows

This commit is contained in:
Jakub Vrana 2018-02-06 12:43:10 +01:00
parent 2d7bda4d1e
commit c34ada5368
3 changed files with 3 additions and 2 deletions

View 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");
}
}
}

View 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

View 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;