Ability to search by expression in select (bug #3158017)
This commit is contained in:
parent
ae84525613
commit
675ac01cc1
|
@ -603,7 +603,7 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
|||
$structured_types[$key] = array_keys($val);
|
||||
}
|
||||
$unsigned = array();
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL");
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "");
|
||||
$functions = array("len", "lower", "round", "upper");
|
||||
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
|
||||
$edit_functions = array(
|
||||
|
|
|
@ -887,7 +887,7 @@ if (!defined("DRIVER")) {
|
|||
$structured_types[$key] = array_keys($val);
|
||||
}
|
||||
$unsigned = array("unsigned", "zerofill", "unsigned zerofill"); ///< @var array number variants
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL"); ///< @var array operators used in select
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", ""); ///< @var array operators used in select
|
||||
$functions = array("char_length", "date", "from_unixtime", "hex", "lower", "round", "sec_to_time", "time_to_sec", "upper"); ///< @var array functions used in select
|
||||
$grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"); ///< @var array grouping functions used in select
|
||||
$edit_functions = array( ///< @var array of array("$type|$type2" => "$function/$function2") functions used in editing, [0] - edit and insert, [1] - edit only
|
||||
|
|
|
@ -350,7 +350,7 @@ UNION SELECT view_name, 'view' FROM user_views" . ($name != "" ? " WHERE view_na
|
|||
$structured_types[$key] = array_keys($val);
|
||||
}
|
||||
$unsigned = array();
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL");
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "");
|
||||
$functions = array("length", "lower", "round", "upper");
|
||||
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
|
||||
$edit_functions = array(
|
||||
|
|
|
@ -533,7 +533,7 @@ AND typelem = 0"
|
|||
$structured_types[$key] = array_keys($val);
|
||||
}
|
||||
$unsigned = array();
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL");
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "");
|
||||
$functions = array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper");
|
||||
$grouping = array("avg", "count", "count distinct", "max", "min", "sum");
|
||||
$edit_functions = array(
|
||||
|
|
|
@ -554,7 +554,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
|||
$types = array("integer" => 0, "real" => 0, "numeric" => 0, "text" => 0, "blob" => 0);
|
||||
$structured_types = array_keys($types);
|
||||
$unsigned = array();
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"); // REGEXP can be user defined function
|
||||
$operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", ""); // REGEXP can be user defined function
|
||||
$functions = array("hex", "length", "lower", "round", "unixepoch", "upper");
|
||||
$grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum");
|
||||
$edit_functions = array(
|
||||
|
|
|
@ -229,7 +229,7 @@ document.getElementById('username').focus();
|
|||
}
|
||||
}
|
||||
echo "<div><select name='where[$i][col]' onchange='selectAddRow(this);'><option value=''>(" . lang('anywhere') . ")" . optionlist($columns, null, true) . "</select>";
|
||||
echo html_select("where[$i][op]", $this->operators);
|
||||
echo html_select("where[$i][op]", $this->operators, "=");
|
||||
echo "<input name='where[$i][val]'></div>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
}
|
||||
|
@ -333,6 +333,8 @@ document.getElementById('username').focus();
|
|||
if (ereg('IN$', $val["op"])) {
|
||||
$in = process_length($val["val"]);
|
||||
$cond .= " (" . ($in != "" ? $in : "NULL") . ")";
|
||||
} elseif (!$val["op"]) {
|
||||
$cond .= $val["val"]; // SQL injection
|
||||
} elseif ($val["op"] == "LIKE %%") {
|
||||
$cond = " LIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
|
||||
} elseif (!ereg('NULL$', $val["op"])) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
Adminer 3.2.0-dev:
|
||||
Get long texts and slow information by AJAX
|
||||
All links and some forms by AJAX in browsers with support for history.pushState
|
||||
Ability to search by expression in select
|
||||
Permanent link in schema
|
||||
Display total time in show only errors mode in SQL command
|
||||
History: edit all
|
||||
|
|
Loading…
Reference in a new issue