From be2afb49c5d776a0dff259d9cc18676d47d9b9a6 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 17 Apr 2025 17:46:43 +0200 Subject: [PATCH] PostgreSQL: Link COUNT(*) --- adminer/select.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 166c0006..18f4866c 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -410,8 +410,10 @@ if (!$columns && support("table")) { . ($is_group || information_schema(DB) ? "" : " " . lang('edit') . "") ); + reset($select); foreach ($row as $key => $val) { if (isset($names[$key])) { + $column = current($select); $field = (array) $fields[$key]; $val = driver()->value($val, $field); if ($val != "" && (!isset($email_fields[$key]) || $email_fields[$key] != "")) { @@ -439,7 +441,7 @@ if (!$columns && support("table")) { } } } - if ($key == "COUNT(*)") { //! columns looking like functions + if ($column == "COUNT(*)") { $link = ME . "select=" . urlencode($TABLE); $i = 0; foreach ((array) $_GET["where"] as $v) { @@ -469,6 +471,7 @@ if (!$columns && support("table")) { ; } } + next($select); } if ($backward_keys) {