1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

non-MySQL: Fix computing unique array

This commit is contained in:
Jakub Vrana
2025-04-17 18:07:23 +02:00
parent e340a2973e
commit 0c5bba47da

View File

@@ -389,10 +389,12 @@ if (!$columns && support("table")) {
$unique_array = unique_array($rows[$n], $indexes);
if (!$unique_array) {
$unique_array = array();
reset($select);
foreach ($rows[$n] as $key => $val) {
if (!preg_match('~^(COUNT\((\*|(DISTINCT )?`(?:[^`]|``)+`)\)|(AVG|GROUP_CONCAT|MAX|MIN|SUM)\(`(?:[^`]|``)+`\))$~', $key)) { //! columns looking like functions
if (!preg_match('~^(COUNT|AVG|GROUP_CONCAT|MAX|MIN|SUM)\(~', current($select))) {
$unique_array[$key] = $val;
}
next($select);
}
}
$unique_idf = "";