function convertSearch($idf, $val, $field) {
return (preg_match('~char|text'
. (!preg_match('~LIKE~', $val["op"]) ? '|date|time(stamp)?' . (is_numeric($val["val"]) ? '|' . number_type() : '') : '')
- . '~', $field["type"])
+ . '~', $field["type"]) || $val["op"] == "SQL"
? $idf
: "CAST($idf AS text)"
);
$structured_types[$key] = array_keys($val);
}
$unsigned = array();
- $operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"); // no "SQL" to avoid SQL injection
+ $operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL");
$functions = array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper");
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
$edit_functions = array(
PDO: Support binary fields download
MySQL: Use CONVERT() only when searching for non-ASCII (bug #603)
PostgreSQL: Do not cast date/time searches to text
+PostgreSQL: Add SQL operator to search
Adminer 4.6.2 (released 2018-02-20):
Semi-transparent border on table actions