From 3a27c4f64c33d19e9ba109361ac90136d15e9180 Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Tue, 17 Sep 2024 15:36:42 +0200 Subject: [PATCH] Editor: Fix searching in tables Thanks to ytetsuro (https://github.com/vrana/adminer/pull/473) --- editor/include/adminer.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 0ba034f1..6f718c35 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -357,7 +357,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 } else { $text_type = preg_match('~char|text|enum|set~', $field["type"]); $value = $this->processInput($field, (!$op && $text_type && preg_match('~^[^%]+$~', $val) ? "%$val%" : $val)); - $conds[] = $driver->convertSearch($name, $val, $field) . ($value == "NULL" ? " IS" . ($op == ">=" ? " NOT" : "") . " $value" + $conds[] = $driver->convertSearch($name, $where, $field) . ($value == "NULL" ? " IS" . ($op == ">=" ? " NOT" : "") . " $value" : (in_array($op, $this->operators) || $op == "=" ? " $op $value" : ($text_type ? " LIKE $value" : " IN (" . str_replace(",", "', '", $value) . ")"