1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 23:27:17 +02:00

PostgreSQL: Limit rows in data manipulation without unique key

This commit is contained in:
Jakub Vrana
2018-02-01 16:56:50 +01:00
parent 763e66a148
commit 52d98e16fa
9 changed files with 15 additions and 13 deletions

View File

@@ -242,9 +242,9 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
}
function limit1($query, $where) {
function limit1($table, $query, $where) {
global $connection;
return ($connection->result("SELECT sqlite_compileoption_used('ENABLE_UPDATE_DELETE_LIMIT')") ? limit($query, $where, 1) : " $query$where");
return ($connection->result("SELECT sqlite_compileoption_used('ENABLE_UPDATE_DELETE_LIMIT')") ? limit($query, $where, 1) : " $query$where"); //! limit
}
function db_collation($db, $collations) {