diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e9eaea4..3a43faca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Adminer dev - PostgreSQL: Mark unique partial indexes as unique (bug #1172) +- ClickHouse: Fix offset (bug #1188) - Plugins: Methods showVariables() and showStatus() (bug #1157) ## Adminer 5.4.1 (released 2025-09-26) diff --git a/plugins/drivers/clickhouse.php b/plugins/drivers/clickhouse.php index 7fa1d5fc..7cbd6a57 100644 --- a/plugins/drivers/clickhouse.php +++ b/plugins/drivers/clickhouse.php @@ -243,7 +243,7 @@ if (isset($_GET["clickhouse"])) { } function limit($query, $where, $limit, $offset = 0, $separator = " ") { - return " $query$where" . ($limit ? $separator . "LIMIT $limit" . ($offset ? ", $offset" : "") : ""); + return " $query$where" . ($limit ? $separator . "LIMIT " . ($offset ? "$offset, " : "") . $limit : ""); } function limit1($table, $query, $where, $separator = "\n") {